Remved references to global function.
This commit is contained in:
parent
813d80a792
commit
0f8d36889f
@ -186,6 +186,8 @@ public:
|
||||
}; // ShadowedSunLightShaderPCF
|
||||
|
||||
// ============================================================================
|
||||
extern float shadowSplit[5];
|
||||
// ----------------------------------------------------------------------------
|
||||
class ShadowedSunLightShaderESM : public TextureShader<ShadowedSunLightShaderESM,
|
||||
3, float, float, float,
|
||||
float>
|
||||
@ -208,6 +210,15 @@ public:
|
||||
|
||||
assignUniforms("split0", "split1", "split2", "splitmax");
|
||||
} // ShadowedSunLightShaderESM
|
||||
// ------------------------------------------------------------------------
|
||||
void render(RTT *rtt)
|
||||
{
|
||||
setTextureUnits(irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH),
|
||||
irr_driver->getDepthStencilTexture(),
|
||||
rtt->getShadowFBO().getRTT()[0]);
|
||||
drawFullScreenEffect(shadowSplit[1], shadowSplit[2],
|
||||
shadowSplit[3], shadowSplit[4]);
|
||||
} // render
|
||||
}; // ShadowedSunLightShaderESM
|
||||
|
||||
// ============================================================================
|
||||
@ -394,9 +405,6 @@ void IrrDriver::uploadLightingData()
|
||||
glBufferSubData(GL_UNIFORM_BUFFER, 0, 36 * sizeof(float), Lighting);
|
||||
} // uploadLightingData
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
extern float shadowSplit[5];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void IrrDriver::renderLights(unsigned pointlightcount, bool hasShadow)
|
||||
{
|
||||
@ -473,15 +481,7 @@ void IrrDriver::renderLights(unsigned pointlightcount, bool hasShadow)
|
||||
|
||||
if (CVS->isESMEnabled())
|
||||
{
|
||||
ShadowedSunLightShaderESM::getInstance()
|
||||
->setTextureUnits(
|
||||
irr_driver->getRenderTargetTexture(RTT_NORMAL_AND_DEPTH),
|
||||
irr_driver->getDepthStencilTexture(),
|
||||
m_rtts->getShadowFBO().getRTT()[0]);
|
||||
DrawFullScreenEffect<ShadowedSunLightShaderESM>(shadowSplit[1],
|
||||
shadowSplit[2],
|
||||
shadowSplit[3],
|
||||
shadowSplit[4]);
|
||||
ShadowedSunLightShaderESM::getInstance()->render(m_rtts);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user