BGE: Fix for [#35204] "New Alpha-Enabled Shadows Work Until UVs Change" reported by Josiah Lane (solarlune).

BL_BlenderShader was only sending over proper UV data if the current drawing mode was KX_TEXTURED. Now it also checks for (and sends data for) alpha shadows.
This commit is contained in:
Mitchell Stokes 2013-05-10 07:05:12 +00:00
parent 4648ec3e82
commit 01a981f5c4

@ -97,8 +97,8 @@ void BL_BlenderShader::SetAttribs(RAS_IRasterizer* ras, const BL_Material *mat)
return;
gpumat = mGPUMat;
if (ras->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) {
if (ras->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED || (ras->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW &&
mat->alphablend != GEMAT_SOLID && !ras->GetUsingOverrideShader())) {
GPU_material_vertex_attributes(gpumat, &attribs);
attrib_num = GetAttribNum();