mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[vulkan] Ignore light map alpha
Needed to use an rgba format to use floats (and optimal layout), but having to set the alpha to 1 even for full-dark luxels is not very efficient. Better to just ignore the alpha in the shader. Fixes the occasional transparent surface in shadowed areas.
This commit is contained in:
parent
55badea1ae
commit
c016ad9f55
2 changed files with 3 additions and 3 deletions
|
@ -117,9 +117,9 @@ main (void)
|
|||
}*/
|
||||
c = texture (Texture, t_st);
|
||||
if (doLight) {
|
||||
c *= texture (Lightmap, l_st);
|
||||
c *= vec4 (texture (Lightmap, l_st).xyz, 1);
|
||||
}
|
||||
c += texture (Glowmap, t_st);
|
||||
c = texture (Lightmap, l_st);
|
||||
c = vec4(texture (Lightmap, l_st).xyz, 1);
|
||||
frag_color = c;//fogBlend (c);
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ Vulkan_BuildLightMap (msurface_t *surf, vulkan_ctx_t *ctx)
|
|||
*out++ += *lightmap++ * scale / 65536.0;
|
||||
*out++ += *lightmap++ * scale / 65536.0;
|
||||
*out++ += *lightmap++ * scale / 65536.0;
|
||||
*out++ = 1;
|
||||
out++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue