Skip to content

bug: residual crunchy lines in specular highlights #6

@jayf0x

Description

@jayf0x

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:renderShaders, FBOs, display passeffort:3Medium — half to full daytype:bugSomething broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions