Effect
Effect
// HDR Settings.
float Defog=0.000; // Strength of FogColor, higher = more.
float4 FogColor={0.0, 0.0, 0.0, 0.0}; // Lens-style color filters for Blue, Red,
Yellow, White.
float Exposure=0.2; // Contrast settings, higher = brighter, but also more white.
float Gamma=0.2; // Gamma settings for darker or lighter shadows and dark areas,
higher = darker.
float BlueShift=0.10; // Shifts entire color spectrum towards blue, good for images
too yellow, but this is global.
// Saturation Levels.
float sat = -0.7; // Saturation levels, higher values = less saturation, 0 = off.
// Sharpen effect settings. For some good settings try using double your resolution
in sxres and syres, and keep sharp strength double the offset.
float sharps = 0.00; // Sharpen Strength.
float offsetv = 0.60; // Offset value, higher = more offset from center.
float sxres = 2560; // Horizontal Resolution setting.
float syres = 2048; // Vertical Resolution setting.
float aspect = 1.25; // Aspect Ratio.
//---------------------------------------------------------------------------------
-----
// 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
//---------------------------------------------------------------------------------
-----
float middlegray=(c.r+c.g+c.b)*0.333;
float3 diffcolor=c.rgb-middlegray;
c.rgb+=diffcolor*-sat;
return c * color;
}
//---------------------------------------------------------------------------------
-----
// Compiler
//---------------------------------------------------------------------------------
-----
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;
}
}