change some gl_FragCoords to match spec doc

This commit is contained in:
hunterk 2017-01-06 12:55:04 -06:00
parent 4aa0679176
commit 7c2c7406ab
3 changed files with 9 additions and 4 deletions

View file

@ -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

5
retro/ascii.slangp Normal file
View file

@ -0,0 +1,5 @@
shaders = 1
shader0 = "shaders/ascii.slang"
filter_linear0 = false
scale_type_0 = source

View file

@ -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));