Modify calls in bloom effect
--HG-- branch : multipass-stereo
This commit is contained in:
parent
5e14dc4458
commit
d5c2a0527d
1 changed files with 8 additions and 8 deletions
|
@ -446,8 +446,8 @@ void CBloomEffect::applyBlur()
|
||||||
|
|
||||||
// initialize vertex program
|
// initialize vertex program
|
||||||
drvInternal->activeVertexProgram(&TextureOffsetVertexProgram);
|
drvInternal->activeVertexProgram(&TextureOffsetVertexProgram);
|
||||||
drvInternal->setConstant(8, 255.f, 255.f, 255.f, 255.f);
|
drvInternal->setUniform4f(IDriver::VertexProgram, 8, 255.f, 255.f, 255.f, 255.f);
|
||||||
drvInternal->setConstant(9, 0.0f, 0.f, 0.f, 1.f);
|
drvInternal->setUniform4f(IDriver::VertexProgram, 9, 0.0f, 0.f, 0.f, 1.f);
|
||||||
|
|
||||||
// initialize blur material
|
// initialize blur material
|
||||||
UMaterial displayBlurMat;
|
UMaterial displayBlurMat;
|
||||||
|
@ -552,8 +552,8 @@ void CBloomEffect::doBlur(bool horizontalBlur)
|
||||||
|
|
||||||
// initialize vertex program
|
// initialize vertex program
|
||||||
drvInternal->activeVertexProgram(&TextureOffsetVertexProgram);
|
drvInternal->activeVertexProgram(&TextureOffsetVertexProgram);
|
||||||
drvInternal->setConstant(8, 255.f, 255.f, 255.f, 255.f);
|
drvInternal->setUniform4f(IDriver::VertexProgram, 8, 255.f, 255.f, 255.f, 255.f);
|
||||||
drvInternal->setConstant(9, 0.0f, 0.f, 0.f, 1.f);
|
drvInternal->setUniform4f(IDriver::VertexProgram, 9, 0.0f, 0.f, 0.f, 1.f);
|
||||||
|
|
||||||
// set several decal constants in order to obtain in the render target texture a mix of color
|
// set several decal constants in order to obtain in the render target texture a mix of color
|
||||||
// of a texel and its neighbored texels on the axe of the pass.
|
// of a texel and its neighbored texels on the axe of the pass.
|
||||||
|
@ -572,10 +572,10 @@ void CBloomEffect::doBlur(bool horizontalBlur)
|
||||||
decalR = 1.f;
|
decalR = 1.f;
|
||||||
decal2R = 2.f;
|
decal2R = 2.f;
|
||||||
}
|
}
|
||||||
drvInternal->setConstant(10, (decalR/(float)_BlurWidth)*blurVec.x, (decalR/(float)_BlurHeight)*blurVec.y, 0.f, 0.f);
|
drvInternal->setUniform2f(IDriver::VertexProgram, 10, (decalR/(float)_BlurWidth)*blurVec.x, (decalR/(float)_BlurHeight)*blurVec.y);
|
||||||
drvInternal->setConstant(11, (decal2R/(float)_BlurWidth)*blurVec.x, (decal2R/(float)_BlurHeight)*blurVec.y, 0.f, 0.f);
|
drvInternal->setUniform2f(IDriver::VertexProgram, 11, (decal2R/(float)_BlurWidth)*blurVec.x, (decal2R/(float)_BlurHeight)*blurVec.y);
|
||||||
drvInternal->setConstant(12, (decalL/(float)_BlurWidth)*blurVec.x, (decalL/(float)_BlurHeight)*blurVec.y, 0.f, 0.f);
|
drvInternal->setUniform2f(IDriver::VertexProgram, 12, (decalL/(float)_BlurWidth)*blurVec.x, (decalL/(float)_BlurHeight)*blurVec.y);
|
||||||
drvInternal->setConstant(13, (decal2L/(float)_BlurWidth)*blurVec.x, (decal2L/(float)_BlurHeight)*blurVec.y, 0.f, 0.f);
|
drvInternal->setUniform2f(IDriver::VertexProgram, 13, (decal2L/(float)_BlurWidth)*blurVec.x, (decal2L/(float)_BlurHeight)*blurVec.y);
|
||||||
|
|
||||||
// initialize material textures
|
// initialize material textures
|
||||||
CMaterial * matObject = _BlurMat.getObjectPtr();
|
CMaterial * matObject = _BlurMat.getObjectPtr();
|
||||||
|
|
Loading…
Reference in a new issue