Fix RGB order in shaders on GLES
This commit is contained in:
parent
3306c2ee29
commit
6cdef9d498
@ -151,9 +151,7 @@ void main(void)
|
||||
color.xyz = color.zyx; // swap RGB order
|
||||
#endif
|
||||
// The alpha gives the ratio of sunlight in the incoming light.
|
||||
float nightRatio = 1.0 - inVertexColor.a;
|
||||
color.rgb = inVertexColor.rgb * (inVertexColor.a * dayLight.rgb +
|
||||
nightRatio * artificialLight.rgb) * 2.0;
|
||||
color.rgb *= 2.0 * mix(artificialLight.rgb, dayLight.rgb, color.a);
|
||||
color.a = 1.0;
|
||||
|
||||
// Emphase blue a bit in darker places
|
||||
|
@ -51,5 +51,9 @@ void main(void)
|
||||
: directional_ambient(normalize(inVertexNormal));
|
||||
#endif
|
||||
|
||||
#ifdef GL_ES
|
||||
varColor = inVertexColor.bgra;
|
||||
#else
|
||||
varColor = inVertexColor;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user