| 765 | } |
| 766 | |
| 767 | void WaterObject::setCustomTextures( S32 matIdx, U32 pass, const WaterMatParams ¶mHandles ) |
| 768 | { |
| 769 | // Always use the ripple texture. |
| 770 | GFX->setTexture( paramHandles.mRippleSamplerSC->getSamplerRegister(pass), mRippleTex ); |
| 771 | |
| 772 | // Only above-water in advanced-lighting uses the foam texture. |
| 773 | if ( matIdx == WaterMat ) |
| 774 | { |
| 775 | GFX->setTexture( paramHandles.mFoamSamplerSC->getSamplerRegister(pass), mFoamTex ); |
| 776 | GFX->setTexture( paramHandles.mDepthGradSamplerSC->getSamplerRegister(pass), mDepthGradientTex ); |
| 777 | } |
| 778 | |
| 779 | if ( ( matIdx == WaterMat || matIdx == BasicWaterMat ) && mCubemap ) |
| 780 | GFX->setCubeTexture( paramHandles.mCubemapSamplerSC->getSamplerRegister(pass), mCubemap->mCubemap ); |
| 781 | else if(paramHandles.mCubemapSamplerSC->getSamplerRegister(pass) != -1 ) |
| 782 | GFX->setCubeTexture( paramHandles.mCubemapSamplerSC->getSamplerRegister(pass), NULL ); |
| 783 | } |
| 784 | |
| 785 | void WaterObject::drawUnderwaterFilter( SceneRenderState *state ) |
| 786 | { |
nothing calls this directly
no test coverage detected