mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-12 06:41:51 +09:00
more emissive and glow codes that fixes glow/emsv-seen-thru-foreground
This commit is contained in:
@@ -16,6 +16,5 @@ const vec2 boolean = vec2(0.0, 1.0);
|
||||
void main(void) {
|
||||
vec4 colorTex0 = texture(u_texture, v_texCoords); // lightmap (RGB) pre-mixed
|
||||
vec4 colorTex1 = texture(tex1, v_texCoords); // lightmap (A) pre-mixed
|
||||
// fragColor = (max(colorTex0, colorTex1) * boolean.yyyx) + (colorTex0 * boolean.xxxy);
|
||||
fragColor = fma(max(colorTex0, colorTex1), boolean.yyyx, colorTex0 * boolean.xxxy);
|
||||
}
|
||||
@@ -16,6 +16,10 @@ const vec2 boolean = vec2(0.0, 1.0);
|
||||
void main(void) {
|
||||
vec4 colorTex0 = texture(u_texture, v_texCoords); // lightmap (RGB) pre-mixed
|
||||
vec4 colorTex1 = texture(tex1, vec2(v_texCoords.x, 1.0 - v_texCoords.y)); // lightmap (A) pre-mixed
|
||||
// fragColor = (max(colorTex0, colorTex1) * boolean.yyyx) + (colorTex0 * boolean.xxxy);
|
||||
fragColor = fma(max(colorTex0, colorTex1), boolean.yyyx, colorTex0 * boolean.xxxy);
|
||||
// if (colorTex0.a > colorTex1.a) {
|
||||
fragColor = fma(max(colorTex0, colorTex1), boolean.yyyx, colorTex0 * boolean.xxxy);
|
||||
// }
|
||||
// else {
|
||||
// fragColor = fma(max(colorTex0, colorTex1), boolean.yyyx, colorTex1 * boolean.xxxy);
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user