Professional Documents
Culture Documents
// Fog filter adjustments. This is used in conjunction with the colour effect,
below.
// The minimum value is 0.000, and turns the feature off.
// The maximum value is 1.000, and applies maximum effect.
// Default value for this setting is 0.100
float Defog = 0.0;
// The color of the filter effect. This is similar to a lens filter effect to
change colour effects/temperature.
// Need to experiment with different values to get different colour effects.
// Default value for this setting is 1.0, 1.0, 1.0, 1.0
float4 FogColor = {0.05, 0.05, 0.05, 0.05};
// Exposure adjustment. This controls the amount of light in a given scene or area.
// The minimum value is -1.000, and would result in a loss of shadow detail, making
dark areas appear grey.
// The maximum value is 1.00, and would result in clipped whites, and extreme high
contrast.
// Default value for this setting is 0.0
float Exposure = 0.5;
// Gamma correction. This is linear gamma correction which controls the overall
brightness.
// The minimum value is 0.500 and results in maximum brightness.
// The maximum value is 2.000 and results in maximum darkness.
// Default value for this setting is 0.800
float Gamma = 0.280;
// Blue shift correction. Allows adjustment of blue in the image. Usefull if you
have too much yellow or red.
// The minimum value is 0.00, and turns this feature off.
// The maximum value is 1.00, and maximizes the blue in the image.
// Default value for this setting is 0.25
float BlueShift = 0.3;
//---------------------------------------------------------------------------------
-----
// Textures
//---------------------------------------------------------------------------------
-----
texture2D texColor;
//---------------------------------------------------------------------------------
-----
// Sampler Inputs
//---------------------------------------------------------------------------------
-----
struct VS_OUTPUT_POST {
float4 vpos : POSITION;
float2 txcoord : TEXCOORD0;
};
struct VS_INPUT_POST {
float3 pos : POSITION;
float2 txcoord : TEXCOORD0;
};
float pixelWidth;
float pixelHeight;
//---------------------------------------------------------------------------------
-----
// Vertex Shader Input
//---------------------------------------------------------------------------------
-----
float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
OUT.vpos=pos;
OUT.txcoord.xy=IN.txcoord.xy;
return OUT;
}
//---------------------------------------------------------------------------------
-----
// Pixel Shader Effects
//---------------------------------------------------------------------------------
-----
float2 tc = uv - VignetteCenter;
float v = length(tc) / VignetteRadius;
c.rgb += pow(v, 4) * VignetteAmount;
//---------------------------------------------------------------------------------
-----
// Compiler 1
//---------------------------------------------------------------------------------
-----
technique PostProcess
{
pass P0
{
#ifdef E_SHADER_3_0
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader = compile ps_3_0 main();
#else
VertexShader = compile vs_2_0 VS_PostProcess();
PixelShader = compile ps_2_0 main();
#endif
ZEnable=FALSE;
CullMode=NONE;
ALPHATESTENABLE=FALSE;
SEPARATEALPHABLENDENABLE=FALSE;
AlphaBlendEnable=FALSE;
FogEnable=FALSE;
SRGBWRITEENABLE=FALSE;
}
}