mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 01:11:32 +11:00
change some gl_FragCoords to match spec doc
This commit is contained in:
parent
4aa0679176
commit
7c2c7406ab
|
@ -97,8 +97,8 @@ float noise( in vec3 x )
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
// from raymarch demo
|
// from raymarch demo
|
||||||
vec2 uv = gl_FragCoord.xy / params.OutputSize.xy;
|
vec2 uv = vTexCoord;
|
||||||
vec2 pos = (-params.OutputSize.xy + 2.0*gl_FragCoord.xy)/ params.OutputSize.y;
|
vec2 pos = (-params.OutputSize.xy + 8.0 * (vTexCoord * params.OutputSize.xy))/ params.OutputSize.y;
|
||||||
float timer = params.FrameCount * 0.025;
|
float timer = params.FrameCount * 0.025;
|
||||||
|
|
||||||
// distort
|
// distort
|
||||||
|
|
5
retro/ascii.slangp
Normal file
5
retro/ascii.slangp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
shaders = 1
|
||||||
|
|
||||||
|
shader0 = "shaders/ascii.slang"
|
||||||
|
filter_linear0 = false
|
||||||
|
scale_type_0 = source
|
|
@ -45,8 +45,8 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec2 uv = gl_FragCoord.xy;
|
vec2 uv = vTexCoord * params.OutputSize.xy;
|
||||||
vec3 col = texture(Source, floor(uv/8.0)*8.0/params.OutputSize.xy + vec2(-0.21, 0.0)).rgb;
|
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));
|
float gray = dot(col.rgb, vec3(0.299, 0.587, 0.114));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue