From: <wel...@us...> - 2010-11-25 10:37:32
|
Revision: 6443 http://planeshift.svn.sourceforge.net/planeshift/?rev=6443&view=rev Author: weltall2 Date: 2010-11-25 10:37:26 +0000 (Thu, 25 Nov 2010) Log Message: ----------- set the depthtest shader to z_only_instanced for alpha instanced items. Modified Paths: -------------- trunk/src/client/pscelclient.cpp Modified: trunk/src/client/pscelclient.cpp =================================================================== --- trunk/src/client/pscelclient.cpp 2010-11-24 19:19:43 UTC (rev 6442) +++ trunk/src/client/pscelclient.cpp 2010-11-25 10:37:26 UTC (rev 6443) @@ -1854,9 +1854,9 @@ if(cal3dvel == 0.0) cal3dvel = velocity.y; cal3dstate->SetVelocity(-cal3dvel, &psengine->GetRandomGen()); - if((velocity.x != 0 || velocity.z != 0) && velocity.Norm() < 2) { + charApp->SetSneak(true); } else @@ -2150,6 +2150,10 @@ csStringID baseType = strings->Request("base"); iShader* shader = material->GetShader(baseType); + // Get the depthtest shader. + csStringID depthTestType = strings->Request("depthtest"); + iShader* shadert = material->GetShader(depthTestType); + // Get the depth shader. csStringID depthType = strings->Request("depthwrite"); iShader* shaderz = material->GetShader(depthType); @@ -2177,6 +2181,8 @@ // alpha objects don't use the depthwrite pass for now. shaderz = shman->GetShader("*null"); + // instanced alpha objects need to use z_only_instanced for depthtest + shadert = shman->GetShader("z_only_instanced"); } else { @@ -2193,6 +2199,9 @@ // Set the diffuse shader on this material. mat->SetShader(diffuseType, shader); + // Set the depthtest shader on this material + mat->SetShader(depthTestType, shadert); + // Set the early_z shader on this material. mat->SetShader(depthType, shaderz); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |