" precision mediump float; \n"
" " void main(){ \n"
" " gl_FragColor = vec4(1.0, 1.0, 0, 1.0); \n"
" " } \n";
In the current Android studio environment, I approached the fragment shader by putting a color value directly, but is there a way to change the color through an external variable?
android opengl
Take Color vec4 out of Uniform and deliver it to the program.
uniform vec4 color;
void main() {
gl_FragColor = color;
}
© 2024 OneMinuteCode. All rights reserved.