replace gl_FragColor with frag_color output vector in fragment shaders
This commit is contained in:
1 parent
be8f71296f
commit
d3e2046b69
2 files changed
+6
-2
No files matched your search
@@ -2,7 +2,9 @@
|
||||
|
||||
uniform vec4 color;
|
||||
|
||||
out vec4 frag_color;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_FragColor = color;
|
||||
frag_color = color;
|
||||
}
|
||||
@@ -7,7 +7,9 @@ in vec2 texture_coord_v;
|
||||
uniform sampler2D texture;
|
||||
uniform vec4 color;
|
||||
|
||||
out vec4 frag_color;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_FragColor = vec4(1, 1, 1, texture2D(texture, texture_coord_v).a) * color;
|
||||
frag_color = vec4(1, 1, 1, texture2D(texture, texture_coord_v).a) * color;
|
||||
}
|
||||
Reference in new issue
Block a user