It seems to do something. Adds the effect to everything.
Image link:
http://imgur.com/89Kw7IN$CAPostFx::enabled = true;
/// The lens distortion coefficient.
$CAPostFx::distCoeffecient = -0.05;
/// The cubic distortion value.
$CAPostFx::cubeDistortionFactor = -0.1;
/// The amount and direction of the maxium shift for
/// the red, green, and blue channels.
$CAPostFx::colorDistortionFactor = "0.005 -0.005 0.01";
singleton GFXStateBlockData( PFX_DefaultChromaticLensStateBlock )
{
zDefined = true;
zEnable = true;
zWriteEnable = false;
samplersDefined = true;
samplerStates[0] = SamplerClampPoint;
};
singleton ShaderData( PFX_ChromaticLensShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/chromaticLens.hlsl";
OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
OGLPixelShaderFile = "shaders/common/postFx/gl/chromaticLens.glsl";
samplerNames[0] = "$backBuffer";
pixVersion = 3.0;
};
singleton PostEffect( ChromaticLensPostFX )
{
renderTime = "PFXAfterDiffuse";
renderPriority = 0.2;
isEnabled = true;
allowReflectPass = true;
shader = PFX_ChromaticLensShader;
stateBlock = PFX_DefaultChromaticLensStateBlock;
texture[0] = "$backBuffer";
target = "$backBuffer";
};
function ChromaticLensPostFX::setShaderConsts( %this )
{
%this.setShaderConst( "$distCoeff", $CAPostFx::distCoeffecient );
%this.setShaderConst( "$cubeDistort", $CAPostFx::cubeDistortionFactor );
%this.setShaderConst( "$colorDistort", $CAPostFx::colorDistortionFactor );
}