Skip to content

Milesy1/edge-rendering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Edge Rendering System

Advanced distributed rendering system with GPU-accelerated processing, real-time compositing, and Web Workers for parallel computation. Demonstrates expertise in complex systems, real-time graphics, and creative technology.

Edge Rendering Demo WebGPU Performance

๐Ÿš€ Features

  • WebGL & WebGPU Rendering: Custom shader pipeline with real-time compilation
  • Distributed Processing: Multi-threaded rendering using Web Workers
  • Real-time Performance: Adaptive quality scaling and live performance monitoring
  • Interactive Demo: Live controls for scene complexity, lighting, and particle systems
  • Advanced Graphics: Particle systems, deferred shading, and post-processing effects
  • Antifragile Design: System improves performance under load

๐ŸŽฏ Live Demo

Try the Interactive Demo

The demo showcases:

  • Real-time 3D rendering with 1M+ triangles
  • GPU-accelerated particle systems (10K+ particles)
  • Dynamic lighting and shadow mapping
  • Live performance metrics and optimization
  • Interactive controls for scene complexity

๐Ÿ› ๏ธ Technical Stack

  • WebGL 2.0 / WebGPU for GPU acceleration
  • Web Workers for distributed computation
  • Custom Shader Programming (GLSL/WGSL)
  • Real-time Geometry Generation and optimization
  • Performance Profiling and adaptive scaling

๐Ÿ“ Project Structure

edge-rendering/
โ”œโ”€โ”€ edge-rendering.html          # Main demonstration page
โ”œโ”€โ”€ edge-rendering.js            # WebGL rendering engine
โ”œโ”€โ”€ edge-renderer-worker.js      # Web Worker for distributed processing
โ”œโ”€โ”€ webgpu-edge-renderer.js      # Advanced WebGPU implementation
โ”œโ”€โ”€ README.md                    # This file
โ””โ”€โ”€ package.json                 # Dependencies and scripts

๐Ÿš€ Quick Start

Option 1: Direct File Access

# Clone the repository
git clone https://github.com/Milesy1/edge-rendering.git
cd edge-rendering

# Open the demo
open edge-rendering.html

Option 2: Local Web Server (Recommended)

# Using Python
python -m http.server 8000

# Using Node.js
npx serve .

# Using PHP
php -S localhost:8000

Then visit http://localhost:8000/edge-rendering.html

๐ŸŽฎ Interactive Controls

The demo includes real-time controls for:

  • Scene Complexity: 1K to 1M triangles
  • Lighting Quality: Basic to Ultra
  • Post-Processing: None to Cinematic
  • Particle Count: 0 to 10,000 particles
  • Performance Metrics: Live FPS, triangle count, memory usage

๐Ÿ—๏ธ Architecture

Distributed Rendering Pipeline

graph TD
    A[Main Thread] --> B[Web Workers]
    B --> C[Geometry Processing]
    B --> D[Particle Simulation]
    B --> E[Lighting Calculations]
    C --> F[GPU Rendering]
    D --> F
    E --> F
    F --> G[Real-time Display]
Loading

Performance Optimization

  • Frustum Culling: Automatic triangle culling
  • Instanced Rendering: Efficient repeated geometry
  • Adaptive Quality: Dynamic LOD based on performance
  • Memory Pooling: Efficient buffer management
  • Parallel Processing: Multi-threaded computation

๐ŸŽจ Shader Examples

Vertex Shader (WebGL)

attribute vec3 position;
attribute vec3 normal;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

varying vec3 vNormal;
varying vec3 vWorldPos;

void main() {
    vec4 worldPos = modelViewMatrix * vec4(position, 1.0);
    gl_Position = projectionMatrix * worldPos;
    
    vNormal = normalize(normalMatrix * normal);
    vWorldPos = worldPos.xyz;
}

Compute Shader (WebGPU)

@compute @workgroup_size(64)
fn cs_main(@builtin(global_invocation_id) globalId: vec3<u32>) {
    let index = globalId.x;
    if (index >= arrayLength(&particles)) {
        return;
    }
    
    var particle = particles[index];
    particle.position = particle.position + particle.velocity * uniforms.deltaTime;
    particle.velocity = particle.velocity + uniforms.gravity * uniforms.deltaTime;
    
    particles[index] = particle;
}

๐Ÿ“Š Performance Metrics

The system provides real-time monitoring of:

  • FPS: Frames per second
  • Triangles: Rendered triangle count
  • Draw Calls: GPU draw operations
  • Memory Usage: GPU memory consumption
  • Worker Performance: Web Worker utilization

๐Ÿ”ง Browser Compatibility

Feature Chrome Firefox Safari Edge
WebGL 2.0 โœ… โœ… โœ… โœ…
Web Workers โœ… โœ… โœ… โœ…
WebGPU โœ… โŒ โŒ โœ…

๐ŸŽฏ Use Cases

  • Creative Technology: Interactive installations and live performances
  • Real-time Visualization: Data visualization and scientific computing
  • Game Development: Browser-based games and simulations
  • Educational: Learning graphics programming and WebGL
  • Research: Performance testing and optimization studies

๐Ÿ† Complex Systems Integration

This project demonstrates antifragile design principles:

  • Redundancy: Multiple rendering paths and fallbacks
  • Optionality: Benefits from increased complexity and load
  • Overcompensation: Adaptive responses exceed requirements
  • Hormesis: Small stresses strengthen system resilience
  • Via Negativa: Removing fragilities rather than adding complexity

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

git clone https://github.com/Milesy1/edge-rendering.git
cd edge-rendering
npm install  # If using package.json

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ”— Related Projects

๐Ÿ‘จโ€๐Ÿ’ป Author

Miles Waite

  • Certified by the Santa Fe Institute of Complex Science
  • 20+ years experience in real-time complex systems
  • Expertise in TouchDesigner, Python, and creative technology
  • Portfolio | GitHub | Email

Built with โค๏ธ for the creative technology and complex systems community

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published