Fix missing decal mask in mobile renderer

This commit is contained in:
Bastiaan Olij 2023-08-23 11:14:10 +10:00
parent 6758a7f8c0
commit 8449331f13
1 changed files with 4 additions and 0 deletions

View File

@ -899,6 +899,10 @@ void main() {
break; break;
} }
if (!bool(decals.data[decal_index].mask & draw_call.layer_mask)) {
continue; //not masked
}
vec3 uv_local = (decals.data[decal_index].xform * vec4(vertex, 1.0)).xyz; vec3 uv_local = (decals.data[decal_index].xform * vec4(vertex, 1.0)).xyz;
if (any(lessThan(uv_local, vec3(0.0, -1.0, 0.0))) || any(greaterThan(uv_local, vec3(1.0)))) { if (any(lessThan(uv_local, vec3(0.0, -1.0, 0.0))) || any(greaterThan(uv_local, vec3(1.0)))) {
continue; //out of decal continue; //out of decal