diff --git a/border/shaders/hexagons-distance.slang b/border/shaders/hexagons-distance.slang index 31f3ae8..63415a8 100644 --- a/border/shaders/hexagons-distance.slang +++ b/border/shaders/hexagons-distance.slang @@ -97,8 +97,8 @@ float noise( in vec3 x ) void main() { // from raymarch demo - vec2 uv = gl_FragCoord.xy / params.OutputSize.xy; - vec2 pos = (-params.OutputSize.xy + 2.0*gl_FragCoord.xy)/ params.OutputSize.y; + vec2 uv = vTexCoord; + vec2 pos = (-params.OutputSize.xy + 8.0 * (vTexCoord * params.OutputSize.xy))/ params.OutputSize.y; float timer = params.FrameCount * 0.025; // distort diff --git a/retro/ascii.slangp b/retro/ascii.slangp new file mode 100644 index 0000000..98205c7 --- /dev/null +++ b/retro/ascii.slangp @@ -0,0 +1,5 @@ +shaders = 1 + +shader0 = "shaders/ascii.slang" +filter_linear0 = false +scale_type_0 = source diff --git a/retro/shaders/ascii.slang b/retro/shaders/ascii.slang index e2b1cc3..ec89d49 100755 --- a/retro/shaders/ascii.slang +++ b/retro/shaders/ascii.slang @@ -45,8 +45,8 @@ layout(set = 0, binding = 2) uniform sampler2D Source; void main() { - vec2 uv = gl_FragCoord.xy; - vec3 col = texture(Source, floor(uv/8.0)*8.0/params.OutputSize.xy + vec2(-0.21, 0.0)).rgb; + vec2 uv = vTexCoord * params.OutputSize.xy; + vec3 col = texture(Source, floor(uv/8.0)*8.0/params.OutputSize.xy).rgb; float gray = dot(col.rgb, vec3(0.299, 0.587, 0.114));