Removed more references to global function.
This commit is contained in:
parent
0f8d36889f
commit
30fa3345e4
@ -162,6 +162,8 @@ public:
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
extern float shadowSplit[5];
|
||||
// ----------------------------------------------------------------------------
|
||||
class ShadowedSunLightShaderPCF : public TextureShader<ShadowedSunLightShaderPCF,
|
||||
3, float, float, float,
|
||||
float, float>
|
||||
@ -183,11 +185,20 @@ public:
|
||||
8, "shadowtex", ST_SHADOW_SAMPLER);
|
||||
assignUniforms("split0", "split1", "split2", "splitmax", "shadow_res");
|
||||
} // ShadowedSunLightShaderPCF
|
||||
// ------------------------------------------------------------------------
|
||||
void render(RTT *rtts)
|
||||
{
|
||||
setTextureUnits(irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH),
|
||||
irr_driver->getDepthStencilTexture(),
|
||||
rtts->getShadowFBO().getDepthTexture() );
|
||||
drawFullScreenEffect(shadowSplit[1], shadowSplit[2], shadowSplit[3],
|
||||
shadowSplit[4],
|
||||
float(UserConfigParams::m_shadows_resolution) );
|
||||
|
||||
} // render
|
||||
}; // ShadowedSunLightShaderPCF
|
||||
|
||||
// ============================================================================
|
||||
extern float shadowSplit[5];
|
||||
// ----------------------------------------------------------------------------
|
||||
class ShadowedSunLightShaderESM : public TextureShader<ShadowedSunLightShaderESM,
|
||||
3, float, float, float,
|
||||
float>
|
||||
@ -485,14 +496,7 @@ void IrrDriver::renderLights(unsigned pointlightcount, bool hasShadow)
|
||||
}
|
||||
else
|
||||
{
|
||||
ShadowedSunLightShaderPCF::getInstance()->setTextureUnits
|
||||
(irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH),
|
||||
irr_driver->getDepthStencilTexture(),
|
||||
m_rtts->getShadowFBO().getDepthTexture() );
|
||||
DrawFullScreenEffect<ShadowedSunLightShaderPCF>
|
||||
(shadowSplit[1], shadowSplit[2], shadowSplit[3],
|
||||
shadowSplit[4],
|
||||
float(UserConfigParams::m_shadows_resolution) );
|
||||
ShadowedSunLightShaderPCF::getInstance()->render(m_rtts);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user