Skip to main content

Introduction

Welcome to RayTracer Studio - a real-time CPU ray tracer that runs entirely in your browser!

What is RayTracer Studio?

RayTracer Studio is an educational and interactive ray tracing application that demonstrates fundamental computer graphics concepts. The rendering engine is written in C++ and compiled to WebAssembly, allowing near-native performance in any modern web browser.

Key Features

  • 🎨 Real-time Rendering - Interactive ray tracing with immediate visual feedback
  • 🪞 Recursive Reflections - Accurate mirror reflections with Fresnel effect
  • 💡 Multiple Colored Lights - Up to 4 lights with customizable colors
  • 🌑 Soft Shadows - Realistic penumbra with area light simulation
  • Anti-Aliasing - Supersampling (2×2, 4×4) with jittered sampling
  • 💎 Blinn-Phong Shading - Realistic specular highlights
  • 📷 Interactive Camera - Orbit, zoom, and adjust field of view
  • 🎭 Scene Presets - Multiple sphere arrangements to explore
  • 📐 3D Ground Plane - Blender-style infinite grid
  • 📱 Responsive Design - Works on desktop and mobile devices

Technology Stack

LayerTechnologyPurpose
Core EngineC++Ray tracing mathematics and rendering
CompilationEmscriptenC++ to WebAssembly compiler
RuntimeWebAssemblyNear-native browser performance
UI FrameworkReactInteractive user interface
Build ToolViteFast development and bundling

How It Works

┌─────────────────────────────────────────────────────────────┐
│ Browser │
│ ┌─────────────────┐ ┌─────────────────────────┐ │
│ │ React UI │ ──────► │ WebAssembly Module │ │
│ │ (Controls) │ state │ (C++ Ray Tracer) │ │
│ └─────────────────┘ └───────────┬─────────────┘ │
│ ▲ │ │
│ │ │ pixel buffer │
│ │ ┌─────────────────────▼─────┐ │
│ └─────────│ HTML Canvas │ │
│ │ (Rendered Image) │ │
│ └───────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Made with ❤️

This project was created by SRS as an educational exploration of ray tracing and WebAssembly.