Halloween Ray Tracer Part 3 Making It Glow

Halloween Ray Tracer Part 3: Making It Glow

Where we left off At the end of Part 2, the jack-o’-lantern had a lit body and a carved face, but the face looked painted on. A real candle-lit pumpkin glows: light spills out of the eyes and mouth and over the edges around them. In games this effect is called bloom. Unity and Unreal […]

Read More
HalloweenRayTracerPart2

Halloween Ray Tracer Part 2: Hitting a Sphere

Where we left off In Part 1, every ray flew off into a purple sky. In this part, some of those rays hit something: a pumpkin, half a unit wide, one unit in front of the camera. We’ll build it up in four steps, and each step gives an image you can run and see: […]

Read More

Halloween Ray Tracer Part 1: A Window, a Vector, and a Purple Sky

Why a pumpkin? This October I started Ray Tracing in One Weekend. I work in Unity and Unreal every day, so I’ve always had a GPU and an engine between me and the pixels. This book throws all of that away and asks: what if you computed every pixel yourself? A few weeks in, I […]

Read More
Building a Walkable VR Mini-Museum in Unity

Building a Walkable VR Mini-Museum in Unity — From Editor to Standalone Quest 3

I built a small VR museum in Unity that you can walk around in, and got it running standalone on a Meta Quest 3 with no PC attached. I love learning about history and art, and VR lets you stand next to a statue instead of looking at a photo of it. I wanted to […]

Read More

Object Pooling Didn’t Fix My Audio Spike. The Import Settings Did.

TL;DR A 5-minute music track set to Decompress On Load froze the main thread for about 390 ms on every cold play, in a Development Build. Switching the clip to Compressed In Memory or Streaming brought the worst frame down to about 2 ms. Object pooling the AudioSource made the play call about 0.02 ms faster, which is real but irrelevant to that spike. Background I […]

Read More
renderer.materialvsMaterialProperty

renderer.material vs MaterialPropertyBlock in URP

TL;DR In URP, coloring 10,000 cubes with a single cached MaterialPropertyBlock was about 6× slower than using renderer.material in my test. The property block saved roughly 10,000 Material objects, but it pushed every cube out of the SRP Batcher: SetPass calls went from 46 to 20,024. renderer.material has a real cost too. It clones one […]

Read More

Swallowing vs. Re-throwing OperationCanceledException in UniTask

The question If you catch OperationCanceledException in a UniTask step and don’t re-throw it, the rest of the chain keeps running and the whole sequence reports success. I’d read that rule many times, but I wanted to see it happen in my own console, with timestamps and frame numbers as evidence. This post is the record of […]

Read More