What's broken
Jagged specular highlights remain after a stroke settles. The Sobel normal kernel at 6-display-px spread reduces aliasing but doesn't eliminate it.
Root cause: density FBO at simScale=0.5 is low-res; fixed-pixel-spread Sobel kernel becomes too small at high DPR or too large at low resolution.
Fix scope
Make normal-sample spread proportional to sim texel size rather than display texel size:
- Use
spread = N / simWidth instead of N / displayWidth
- Alternatively: single-pass separable Gaussian blur of density FBO before display pass to produce a smooth height field for normal computation.
Files likely touched: src/core/shaders.ts, src/core/wgsl-shaders.ts
What's broken
Jagged specular highlights remain after a stroke settles. The Sobel normal kernel at 6-display-px spread reduces aliasing but doesn't eliminate it.
Root cause: density FBO at
simScale=0.5is low-res; fixed-pixel-spread Sobel kernel becomes too small at high DPR or too large at low resolution.Fix scope
Make normal-sample spread proportional to sim texel size rather than display texel size:
spread = N / simWidthinstead ofN / displayWidthFiles likely touched:
src/core/shaders.ts,src/core/wgsl-shaders.ts