使用 WebGL2 构建的光子追踪器
Alexey Fateev
http://Z.ai shipped GLM-5.4 with ZERO benchmark tables, so I skipped the charts and made it write a photon tracer from scratch. It built 2 raw WebGL2 scenes in OpenCode with 0 libraries and 0 assets, which comes out to 2,372 lines of shaders and math in 2 HTML files you can open in any browser. Calcite & Ice puts a birefringent crystal that splits every light ray in 2 right next to cracked glacier ice. 60,000 photons per frame paint real caustics across the table while a volumetric beam cuts through the dust, with 3 lamp modes to switch between. Anamorphic Candle is wilder. Candlelight passes through a tilting glass lens and hits a mirrored cylinder, and the smeared drawing on the parchment snaps back into a clean picture in the reflection. It traces ~65K photons in 3 wavelengths and snaps everything to a 48-color pixel art palette. I pulled the receipts from the OpenCode logs. The crystal took 129 agent steps and ~258K generated tokens, and 162K of those were reasoning. The candle took 286 steps and ~375K tokens with 278K of reasoning, and I had to nudge it twice to keep going. Cache reads hit 131M across both runs, all on the http://Z.ai coding plan. People spent all day roasting this model for looping in agent runs, and it still wrote both renderers without pulling in a single dependency. Benchmarks can wait. Shaders can't fake it.查看原帖