First published at 12:45 UTC on December 17th, 2019.
How are fragment shaders actually working?
More than one color on screen?
Why so difficult?
This series is based off of the free on-line book, "The Book Of Shaders", by Patricio Gonzalez Vivo and Jen Lowe.
https://thebookofshaders.com/
If you…
MORE
How are fragment shaders actually working?
More than one color on screen?
Why so difficult?
This series is based off of the free on-line book, "The Book Of Shaders", by Patricio Gonzalez Vivo and Jen Lowe.
https://thebookofshaders.com/
If you feel like donating, please donate to those two; a donation link is found on their website linked above.
Previous video: https://www.bitchute.com/video/jLw0jBL9znVv/
Editor used: https://patriciogonzalezvivo.github.io/glslEditor/
Code used:
1.
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
void main() {
vec2 st = gl_FragCoord.xy/u_resolution;
if (st.x >= 0.500 && st.x <= 0.503 && st.y >= 0.500 && st.y <= 0.503) {
gl_FragColor = vec4(1.,1.0,1.0,1.0);
} else {
gl_FragColor = vec4(0.,0.0,0.0,1.0);
}
}
2.
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
void main() {
vec2 st = gl_FragCoord.xy/u_resolution;
vec3 canvas = vec3(1.0);
canvas = mix(canvas, vec3(1.0,0.0,0.0), st.x);
gl_FragColor = vec4(canvas, 1.0);
}
Subscribe to my channel: https://www.bitchute.com/channel/gPUmRsVcChxX/
If you find value in what I do, think about supporting my channel: https://www.paypal.me/anobjisa
Find me here:
Youtube: https://www.youtube.com/channel/UCar-9GMCRk9QdKJXq6s1yeg
Twitter: https://twitter.com/anobjectisa1
Minds: https://www.minds.com/an_object_is_a/
Instagram: https://www.instagram.com/an_object_is_a/
LESS