kik shader: derive step from resolution so the full preview scales
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
eb5f858151
commit
b158c36502
1 changed files with 5 additions and 1 deletions
|
|
@ -20,6 +20,10 @@ Shaders define `mainImage(out vec4 fragColor, in vec2 fragCoord)` and may
|
|||
use `iResolution`, `iTime`, `iTimeDelta` and `iFrame`. The file is reloaded
|
||||
when it changes; on a compile error the last working shader keeps running.
|
||||
|
||||
The same shader also runs at full size in the debug window, so derive the
|
||||
step from the resolution (`floor(fragCoord.x / iResolution.x * 16.0)`) or use
|
||||
`fragCoord.x / iResolution.x`, never raw `fragCoord.x`.
|
||||
|
||||
White channel: `extract` (default) sets `w = min(r,g,b)` and subtracts it
|
||||
from rgb, `alpha` uses the shader's alpha, `off` sends w = 0.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue