stevensona/shader-toy

Default texture wrap mode set to clamp, not repeat as on shadertoy.com

Anyeos opened this issue · 1 comments

On an simple shadertoy.com example:

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // Normalized pixel coordinates (from 0 to 1)
    vec2 uv = fragCoord/iResolution.xy + iTime;

    // Output to screen
    fragColor = texture(iChannel0, uv);
}

The texture just is repeated. But it is not the same case for the "GLSL Preview". The texture is only one time and get out of the screen :P

Yes, in fact defaults in VSCode ShaderToy are different than defaults on shadertoy.com
It could be worth to align the defaults to avoid confusion.

If you check the readme you can see that repeat mode is already supported, simply add this line to your shader:

#iChannel0::WrapMode "Repeat"