summaryrefslogtreecommitdiffhomepage
path: root/examples/web/shaders/shaders_multi_sample2d.data
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-17 19:03:28 +0100
committerRay <[email protected]>2021-03-17 19:03:28 +0100
commit9ab5e45031a38b5fbc32a2f28a429edf5ccbfc27 (patch)
tree0b3733de9039427bff912e54a07889967e5d2ead /examples/web/shaders/shaders_multi_sample2d.data
parent77d88a804bcf3d34e7538b91d6017748f08c28e0 (diff)
downloadraylib.com-9ab5e45031a38b5fbc32a2f28a429edf5ccbfc27.tar.gz
raylib.com-9ab5e45031a38b5fbc32a2f28a429edf5ccbfc27.zip
Reviewed several examples for web
- shaders_spotlight - shaders_multi_sample2d
Diffstat (limited to 'examples/web/shaders/shaders_multi_sample2d.data')
-rw-r--r--examples/web/shaders/shaders_multi_sample2d.data6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/web/shaders/shaders_multi_sample2d.data b/examples/web/shaders/shaders_multi_sample2d.data
index 0074e6a..4bda619 100644
--- a/examples/web/shaders/shaders_multi_sample2d.data
+++ b/examples/web/shaders/shaders_multi_sample2d.data
@@ -11,6 +11,8 @@ uniform sampler2D texture0;
uniform sampler2D texture1;
uniform vec4 colDiffuse;
+uniform float divider;
+
void main()
{
// Texel color fetching from texture sampler
@@ -18,7 +20,7 @@ void main()
vec4 texelColor1 = texture2D(texture1, fragTexCoord);
float x = fract(fragTexCoord.s);
- float out = smoothstep(0.4, 0.6, x);
+ float final = smoothstep(divider - 0.1, divider + 0.1, x);
- gl_FragColor = mix(texelColor0, texelColor1, out);
+ gl_FragColor = mix(texelColor0, texelColor1, final);
} \ No newline at end of file