bypass pixel shader for non alpha tested shadows
This commit is contained in:
@@ -242,7 +242,7 @@ struct Material
|
||||
|
||||
planar_reflections = false;
|
||||
|
||||
alphaRef = 0.75f;
|
||||
alphaRef = 1.0f; // no alpha test by default
|
||||
}
|
||||
|
||||
bool IsTransparent() const { return alpha < 1.0f; }
|
||||
|
||||
@@ -3980,7 +3980,15 @@ void wiRenderer::RenderMeshes(const XMFLOAT3& eye, const CulledCollection& culle
|
||||
}
|
||||
|
||||
PSTYPES realPS = GetPSTYPE(shaderType, material);
|
||||
GetDevice()->BindPS(pixelShaders[realPS], threadID);
|
||||
if (shaderType == SHADERTYPE_SHADOW && material->alphaRef > 1.0f - 1.0f/256.0f)
|
||||
{
|
||||
// bypass pixel shader for non alpha tested shadows
|
||||
GetDevice()->BindPS(nullptr, threadID);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetDevice()->BindPS(pixelShaders[realPS], threadID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace wiVersion
|
||||
// minor features, major updates
|
||||
const int minor = 11;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 36;
|
||||
const int revision = 37;
|
||||
|
||||
|
||||
long GetVersion()
|
||||
|
||||
Reference in New Issue
Block a user