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: • OpenGL Fragment Shaders | GLSL and Our Env...
Editor used: https://patriciogonzalezvivo.github.i...
Subscribe to my channel: / @anobj
If you find value in what I do, think about supporting my channel:
Paypal: https://www.paypal.me/anobjisa
Bitcoin: 3H4NKKwPdbiE5Gtc3Uk2DiwszqHhrRbmKK
Ethereum: 0x48702412F448a27be03836fb6FE6456603668030
Litecoin: MNJ4uv3GD4r62VpQ8rHX1Pj1ihWCj74hCK
Find me here:
Bitchute: https://www.bitchute.com/channel/gPUm...
Twitter: / anobjectisa1
Minds: https://www.minds.com/an_object_is_a/
Instagram: / an_object_is_a
Code used:
1.
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
void main() {
vec2 st = gl_FragCoord.xy/u_resolution;
// Youtube descriptions do not allow the angle brackets
// gteq = greater than or equal to
// lteq = less than or equal to
if (st.x gteq 0.500 && st.x lteq 0.503 &&
st.y gteq 0.500 && st.y lteq 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);
}
Auf dieser Seite können Sie das Online-Video OpenGL Fragment Shaders | How Do Fragment Shaders Work? mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer An Object Is A 16 Dezember 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 10,007 Mal angesehen und es wurde von 234 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!