mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-18 02:41:29 +02:00
fix alpha test for shadows
This commit is contained in:
@@ -86,6 +86,7 @@ struct ShaderCache {
|
||||
compile(Core::passShadow, Shader::ENTITY, fx, rsShadow);
|
||||
compile(Core::passShadow, Shader::ENTITY, fx, rsShadow | RS_DISCARD);
|
||||
compile(Core::passShadow, Shader::MIRROR, fx, rsShadow);
|
||||
compile(Core::passShadow, Shader::MIRROR, fx, rsShadow | RS_DISCARD);
|
||||
}
|
||||
|
||||
void prepareWater(int fx) {
|
||||
|
@@ -379,7 +379,7 @@ struct Level : IGame {
|
||||
|
||||
virtual void setRoomParams(int roomIndex, Shader::Type type, float diffuse, float ambient, float specular, float alpha, bool alphaTest = false) {
|
||||
if (Core::pass == Core::passShadow) {
|
||||
setShader(Core::pass, type);
|
||||
setShader(Core::pass, type, false, alphaTest);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -394,6 +394,8 @@ uniform vec4 uFogParams;
|
||||
#ifdef PASS_COMPOSE
|
||||
vec3 rv = reflect(-normalize(vViewVec.xyz), normalize(vNormal.xyz));
|
||||
color = textureCube(sEnvironment, normalize(rv));
|
||||
#else
|
||||
color = vec4(1.0);
|
||||
#endif
|
||||
#else
|
||||
#if defined(PASS_COMPOSE) && !defined(TYPE_SPRITE)
|
||||
|
Reference in New Issue
Block a user