mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
Direct3D11 common shader changes.
This commit is contained in:
parent
1ff6f221fb
commit
3a9b50f702
283 changed files with 3547 additions and 1834 deletions
|
|
@ -28,6 +28,8 @@ uniform sampler2D backBuffer;
|
|||
uniform sampler1D colorCorrectionTex;
|
||||
|
||||
uniform float OneOverGamma;
|
||||
uniform float Brightness;
|
||||
uniform float Contrast;
|
||||
|
||||
in vec2 uv0;
|
||||
|
||||
|
|
@ -45,5 +47,11 @@ void main()
|
|||
// Apply gamma correction
|
||||
color.rgb = pow( abs(color.rgb), vec3(OneOverGamma) );
|
||||
|
||||
// Apply contrast
|
||||
color.rgb = ((color.rgb - 0.5f) * Contrast) + 0.5f;
|
||||
|
||||
// Apply brightness
|
||||
color.rgb += Brightness;
|
||||
|
||||
OUT_col = color;
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ out vec4 OUT_col;
|
|||
void main()
|
||||
{
|
||||
vec4 kernel = vec4( 0.175, 0.275, 0.375, 0.475 ) * 0.5f;
|
||||
|
||||
|
||||
OUT_col = vec4(0);
|
||||
OUT_col += texture( diffuseMap, uv0 ) * kernel.x;
|
||||
OUT_col += texture( diffuseMap, uv1 ) * kernel.y;
|
||||
|
|
@ -55,5 +55,5 @@ void main()
|
|||
// can use alpha test to save fillrate.
|
||||
vec3 rgb2lum = vec3( 0.30, 0.59, 0.11 );
|
||||
OUT_col.a = dot( OUT_col.rgb, rgb2lum );
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue