-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedge-rendering.html
More file actions
366 lines (324 loc) · 18.7 KB
/
edge-rendering.html
File metadata and controls
366 lines (324 loc) · 18.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Edge Rendering - Miles Waite</title>
<meta name="description" content="Advanced edge rendering systems with distributed GPU processing and real-time compositing" />
<link rel="icon" href="favicon-32x32.png" type="image/png" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<style>
.edge-rendering-demo {
background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
color: #ffffff;
padding: 2rem;
border-radius: 12px;
margin: 2rem 0;
border: 1px solid #333;
}
.rendering-canvas {
width: 100%;
height: 400px;
border: 1px solid #444;
border-radius: 8px;
background: #000;
margin: 1rem 0;
}
.controls {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin: 1rem 0;
}
.control-group {
background: rgba(255, 255, 255, 0.05);
padding: 1rem;
border-radius: 8px;
border: 1px solid #333;
}
.control-group label {
display: block;
margin-bottom: 0.5rem;
font-size: 0.9rem;
color: #ccc;
}
.control-group input, .control-group select {
width: 100%;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.1);
border: 1px solid #555;
border-radius: 4px;
color: #fff;
}
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
margin: 1rem 0;
}
.stat-item {
background: rgba(99, 102, 241, 0.1);
padding: 1rem;
border-radius: 8px;
text-align: center;
border: 1px solid rgba(99, 102, 241, 0.3);
}
.stat-value {
font-size: 1.5rem;
font-weight: 600;
color: #6366f1;
}
.stat-label {
font-size: 0.8rem;
color: #ccc;
margin-top: 0.25rem;
}
.shader-code {
background: #1a1a1a;
border: 1px solid #333;
border-radius: 8px;
padding: 1rem;
margin: 1rem 0;
font-family: 'Courier New', monospace;
font-size: 0.85rem;
color: #fff;
overflow-x: auto;
}
.shader-code .comment { color: #666; }
.shader-code .keyword { color: #6366f1; }
.shader-code .string { color: #10b981; }
.shader-code .number { color: #f59e0b; }
</style>
</head>
<body>
<header>
<nav>
<a href="index.html" class="logo">mileswaite.net</a>
<ul class="nav-links">
<li><a href="index.html#projects">Projects</a></li>
<li><a href="index.html#music">Music</a></li>
<li><a href="index.html#code">Code</a></li>
<li><a href="index.html#about">About</a></li>
</ul>
</nav>
</header>
<main>
<section class="hero">
<div class="hero-content">
<p class="subtitle">Code</p>
<h1>Edge Rendering</h1>
<p class="description">
Advanced distributed rendering systems with <span class="tooltip">GPU-accelerated processing<span class="tooltiptext">Utilizing graphics processing units for parallel computation, enabling real-time rendering of complex scenes with millions of polygons and advanced lighting effects.</span></span> and real-time compositing
</p>
</div>
</section>
<section class="project-details">
<div class="project-content">
<div class="project-info">
<h2>Overview</h2>
<p>This edge rendering system demonstrates advanced distributed graphics processing capabilities, combining WebGL, WebGPU, and Web Workers to create a scalable rendering pipeline that can handle complex scenes with real-time performance.</p>
<h3>Edge Rendering Architecture</h3>
<ul>
<li><strong>Distributed Processing:</strong> Multiple Web Workers handling different rendering tasks</li>
<li><strong>GPU Acceleration:</strong> WebGL and WebGPU for parallel computation</li>
<li><strong>Real-time Compositing:</strong> Dynamic scene assembly and post-processing</li>
<li><strong>Adaptive Quality:</strong> Automatic LOD and quality adjustment based on performance</li>
<li><strong>Memory Management:</strong> Efficient buffer management and garbage collection</li>
</ul>
<h3>Technical Features</h3>
<ul>
<li>Custom shader pipeline with real-time compilation</li>
<li>Multi-pass rendering with deferred shading</li>
<li>Particle systems with GPU-based simulation</li>
<li>Real-time lighting and shadow mapping</li>
<li>Post-processing effects and compositing</li>
</ul>
<h3>Performance Optimization</h3>
<ul>
<li>Frustum culling and occlusion queries</li>
<li>Instanced rendering for repeated geometry</li>
<li>Texture atlasing and compression</li>
<li>Adaptive frame rate and quality scaling</li>
<li>Memory pooling and object reuse</li>
</ul>
<h3>Interactive Demo</h3>
<p>Use the controls below to experiment with different rendering parameters and see real-time performance metrics.</p>
</div>
<div class="project-media">
<div class="edge-rendering-demo">
<h3>Edge Rendering Demo</h3>
<canvas id="edge-canvas" class="rendering-canvas"></canvas>
<div class="stats">
<div class="stat-item">
<div class="stat-value" id="fps">60</div>
<div class="stat-label">FPS</div>
</div>
<div class="stat-item">
<div class="stat-value" id="triangles">0</div>
<div class="stat-label">Triangles</div>
</div>
<div class="stat-item">
<div class="stat-value" id="draw-calls">0</div>
<div class="stat-label">Draw Calls</div>
</div>
<div class="stat-item">
<div class="stat-value" id="memory">0</div>
<div class="stat-label">Memory (MB)</div>
</div>
</div>
<div class="controls">
<div class="control-group">
<label>Scene Complexity</label>
<select id="complexity">
<option value="low">Low (1K triangles)</option>
<option value="medium" selected>Medium (10K triangles)</option>
<option value="high">High (100K triangles)</option>
<option value="extreme">Extreme (1M triangles)</option>
</select>
</div>
<div class="control-group">
<label>Lighting Quality</label>
<select id="lighting">
<option value="basic">Basic</option>
<option value="standard" selected>Standard</option>
<option value="advanced">Advanced</option>
<option value="ultra">Ultra</option>
</select>
</div>
<div class="control-group">
<label>Post-Processing</label>
<select id="postprocessing">
<option value="none">None</option>
<option value="basic" selected>Basic</option>
<option value="advanced">Advanced</option>
<option value="cinematic">Cinematic</option>
</select>
</div>
<div class="control-group">
<label>Particle Count</label>
<input type="range" id="particles" min="0" max="10000" value="1000" step="100">
<span id="particle-count">1000</span>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="project-details">
<div class="project-content">
<div class="project-info">
<h2>Shader Pipeline</h2>
<p>The edge rendering system uses a custom shader pipeline with real-time compilation and optimization. Here's an example of the vertex shader used for the particle system:</p>
<div class="shader-code">
<span class="comment">// Vertex Shader - Particle System</span>
<span class="keyword">attribute</span> <span class="keyword">vec3</span> position;
<span class="keyword">attribute</span> <span class="keyword">vec3</span> velocity;
<span class="keyword">attribute</span> <span class="keyword">float</span> life;
<span class="keyword">attribute</span> <span class="keyword">float</span> size;
<span class="keyword">uniform</span> <span class="keyword">mat4</span> modelViewMatrix;
<span class="keyword">uniform</span> <span class="keyword">mat4</span> projectionMatrix;
<span class="keyword">uniform</span> <span class="keyword">float</span> time;
<span class="keyword">uniform</span> <span class="keyword">vec3</span> gravity;
<span class="keyword">varying</span> <span class="keyword">float</span> vLife;
<span class="keyword">varying</span> <span class="keyword">vec3</span> vColor;
<span class="keyword">void</span> main() {
<span class="comment">// Update particle position based on velocity and time</span>
<span class="keyword">vec3</span> newPosition = position + velocity * time + gravity * time * time * <span class="number">0.5</span>;
<span class="comment">// Calculate life-based color</span>
vLife = life;
vColor = <span class="keyword">vec3</span>(<span class="number">1.0</span>, life, life * life);
<span class="comment">// Apply size based on life</span>
<span class="keyword">float</span> finalSize = size * life;
<span class="comment">// Transform to screen space</span>
<span class="keyword">vec4</span> mvPosition = modelViewMatrix * <span class="keyword">vec4</span>(newPosition, <span class="number">1.0</span>);
gl_Position = projectionMatrix * mvPosition;
gl_PointSize = finalSize * (<span class="number">300.0</span> / -mvPosition.z);
}
</div>
<h3>Fragment Shader</h3>
<div class="shader-code">
<span class="comment">// Fragment Shader - Particle Rendering</span>
<span class="keyword">precision</span> <span class="keyword">mediump</span> <span class="keyword">float</span>;
<span class="keyword">varying</span> <span class="keyword">float</span> vLife;
<span class="keyword">varying</span> <span class="keyword">vec3</span> vColor;
<span class="keyword">void</span> main() {
<span class="comment">// Create circular particle shape</span>
<span class="keyword">vec2</span> center = gl_PointCoord - <span class="keyword">vec2</span>(<span class="number">0.5</span>);
<span class="keyword">float</span> dist = length(center);
<span class="comment">// Soft edge with life-based alpha</span>
<span class="keyword">float</span> alpha = (<span class="number">1.0</span> - smoothstep(<span class="number">0.0</span>, <span class="number">0.5</span>, dist)) * vLife;
<span class="comment">// Apply color and alpha</span>
gl_FragColor = <span class="keyword">vec4</span>(vColor, alpha);
}
</div>
</div>
<div class="project-media">
<div class="media-placeholder">
<p>Edge Rendering Assets</p>
<ul>
<li>Shader source code and compilation tools</li>
<li>Performance profiling and optimization tools</li>
<li>Rendering pipeline documentation</li>
<li>Benchmark results and comparisons</li>
</ul>
</div>
</div>
</div>
</section>
<section class="related-projects">
<h2>Related Projects</h2>
<div class="projects-grid">
<div class="project-card" onclick="window.location.href='systems-architecture.html'">
<h3>Systems Architecture</h3>
<p>Large-scale real-time systems with antifragile design principles</p>
</div>
<div class="project-card" onclick="window.location.href='creative-coding.html'">
<h3>Creative Coding</h3>
<p>Generative art, procedural graphics, and algorithmic design</p>
</div>
<div class="project-card" onclick="window.location.href='audio-reactive-abstract-geometry.html'">
<h3>Audio Reactive Geometry</h3>
<p>Real-time geometric visualizations that respond to audio input</p>
</div>
</div>
</section>
</main>
<footer>
<div class="footer-content">
<div class="footer-links">
<a href="mailto:lorenzsys@protonmail.com" class="social-link" title="Email">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
</svg>
</a>
<a href="https://github.com/Milesy1" target="_blank" class="social-link" title="GitHub">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
</a>
<a href="https://www.instagram.com/miles_waite_td" target="_blank" class="social-link" title="Instagram">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"/>
</svg>
</a>
<a href="https://bento.me/mileswaite" target="_blank" class="social-link" title="Bento">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
</svg>
</a>
<a href="https://www.patreon.com/c/u39389547/collections" target="_blank" class="social-link" title="Patreon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M0 .48v23.04h4.22V.48zm15.385 0c-4.764 0-8.641 3.88-8.641 8.65 0 4.755 3.877 8.623 8.641 8.623 4.75 0 8.615-3.868 8.615-8.623C24 4.36 20.136.48 15.385.48z"/>
</svg>
</a>
</div>
<div class="footer-bottom">
© 2025 Miles Waite. All Rights Reserved.
</div>
</div>
</footer>
<script src="tooltips.js"></script>
<script src="edge-rendering.js"></script>
</body>
</html>