diff options
author | aap <aap@papnet.eu> | 2021-01-10 13:05:34 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-10 13:05:34 +0100 |
commit | 453405f131f91e601f0300a3c4fbe0b689880431 (patch) | |
tree | 9cb5f34cb35641bef51b2d569bd2127a2937c9ea /src/extras/custompipes_gl.cpp | |
parent | env map rendering (diff) | |
download | re3-453405f131f91e601f0300a3c4fbe0b689880431.tar re3-453405f131f91e601f0300a3c4fbe0b689880431.tar.gz re3-453405f131f91e601f0300a3c4fbe0b689880431.tar.bz2 re3-453405f131f91e601f0300a3c4fbe0b689880431.tar.lz re3-453405f131f91e601f0300a3c4fbe0b689880431.tar.xz re3-453405f131f91e601f0300a3c4fbe0b689880431.tar.zst re3-453405f131f91e601f0300a3c4fbe0b689880431.zip |
Diffstat (limited to '')
-rw-r--r-- | src/extras/custompipes_gl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index e9350802..54e212d6 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -805,6 +805,9 @@ AtomicFirstPass(RpAtomic *atomic, int pass) for(rw::uint32 i = 0; i < building->instHeader->numMeshes; i++, inst++){ Material *m = inst->material; + if(m->texture == nil) + continue; + if(inst->vertexAlpha || m->color.alpha != 255 || IsTextureTransparent(m->texture)){ defer = true; @@ -913,6 +916,8 @@ RenderBlendPass(int pass) InstanceData *inst = building->instHeader->inst; for(rw::uint32 j = 0; j < building->instHeader->numMeshes; j++, inst++){ Material *m = inst->material; + if(m->texture == nil) + continue; if(!inst->vertexAlpha && m->color.alpha == 255 && !IsTextureTransparent(m->texture) && building->fadeAlpha == 255) continue; // already done this one @@ -921,7 +926,7 @@ RenderBlendPass(int pass) setMaterial(color, m->surfaceProps, 0.5f); float cs = 1.0f; - if(m->texture) + if(m->texture) // always true cs = 255/128.0f; colorscale[0] = colorscale[1] = colorscale[2] = cs; glUniform4fv(U(CustomPipes::u_colorscale), 1, colorscale); |