Skip to content

Commit 4784555

Browse files
committed
add non masked drawing to background shader
1 parent 8728225 commit 4784555

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Data/Base.rte/Shaders/Background.frag

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ out vec4 FragColor;
77

88
uniform sampler2D rteTexture;
99
uniform vec4 rteColor;
10+
uniform bool drawMasked;
1011

1112

1213
vec4 texture2DAA(sampler2D tex, vec2 uv) {
@@ -20,8 +21,8 @@ vec4 texture2DAA(sampler2D tex, vec2 uv) {
2021

2122
void main() {
2223
float red = texture2D(rteTexture, textureUV).r;
23-
if (red==0) {
24+
if (red==0 && drawMasked) {
2425
discard;
2526
}
26-
FragColor = vec4(red, 0.0, 0.0, float(red > 0.00001)) * vertexColor.r;
27+
FragColor = vec4(red, 0.0, 0.0, 0) * vertexColor.r;
2728
}

0 commit comments

Comments
 (0)