Fix shadows for unlit with alpha ref.
This commit is contained in:
parent
858b789419
commit
87bf242164
@ -8,6 +8,6 @@ void main(void)
|
||||
{
|
||||
vec4 col = texture(tex, uv);
|
||||
col.xyz *= pow(color.xyz, vec3(2.2));
|
||||
if (col.a * color.a < 0.5) discard;
|
||||
if (col.a < 0.5) discard;
|
||||
FragColor = vec4(col.xyz, 1.);
|
||||
}
|
||||
|
@ -553,11 +553,11 @@ void IrrDriver::renderShadows()
|
||||
std::vector<GLuint> noTexUnits;
|
||||
renderShadow<MeshShader::ShadowShader, EVT_STANDARD, 1>(noTexUnits, ListMatDefault::Arguments);
|
||||
renderShadow<MeshShader::ShadowShader, EVT_STANDARD, 1>(noTexUnits, ListMatSphereMap::Arguments);
|
||||
renderShadow<MeshShader::ShadowShader, EVT_STANDARD, 1>(noTexUnits, ListMatUnlit::Arguments);
|
||||
renderShadow<MeshShader::ShadowShader, EVT_2TCOORDS, 1>(noTexUnits, ListMatDetails::Arguments);
|
||||
renderShadow<MeshShader::ShadowShader, EVT_2TCOORDS, 1>(noTexUnits, ListMatSplatting::Arguments);
|
||||
renderShadow<MeshShader::ShadowShader, EVT_TANGENTS, 1>(noTexUnits, ListMatNormalMap::Arguments);
|
||||
renderShadow<MeshShader::RefShadowShader, EVT_STANDARD, 1>(std::vector<GLuint>{ MeshShader::RefShadowShader::getInstance()->TU_tex }, ListMatAlphaRef::Arguments);
|
||||
renderShadow<MeshShader::RefShadowShader, EVT_STANDARD, 1>(std::vector<GLuint>{ MeshShader::RefShadowShader::getInstance()->TU_tex }, ListMatUnlit::Arguments);
|
||||
renderShadow<MeshShader::GrassShadowShader, EVT_STANDARD, 3, 1>(std::vector<GLuint>{ MeshShader::GrassShadowShader::getInstance()->TU_tex }, ListMatGrass::Arguments);
|
||||
|
||||
glDisable(GL_POLYGON_OFFSET_FILL);
|
||||
|
Loading…
Reference in New Issue
Block a user