diff options
author | ImJezze <jezze@gmx.net> | 2015-12-31 16:32:35 +0100 |
---|---|---|
committer | ImJezze <jezze@gmx.net> | 2015-12-31 16:32:35 +0100 |
commit | eea40fd0e47699261332904b5d930f0be68756e9 (patch) | |
tree | 4c996b59c2aa3594d68957b1d1e762c07941e702 /hlsl/color.fx | |
parent | ff77b7897bcf0a967f7e275b289a1f8fd18ecd7e (diff) |
Cleanup (nw)
- removed unused pincushion.fx
Diffstat (limited to 'hlsl/color.fx')
-rw-r--r-- | hlsl/color.fx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/hlsl/color.fx b/hlsl/color.fx index 7724eeb10f7..79f55260d4f 100644 --- a/hlsl/color.fx +++ b/hlsl/color.fx @@ -4,6 +4,10 @@ // Color-Convolution Effect //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Sampler Definitions +//----------------------------------------------------------------------------- + texture Diffuse; sampler DiffuseSampler = sampler_state @@ -43,7 +47,7 @@ struct PS_INPUT }; //----------------------------------------------------------------------------- -// Post-Processing Vertex Shader +// Color-Convolution Vertex Shader //----------------------------------------------------------------------------- uniform float2 ScreenDims; @@ -68,7 +72,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Post-Processing Pixel Shader +// Color-Convolution Pixel Shader //----------------------------------------------------------------------------- uniform float3 RedRatios = float3(1.0f, 0.0f, 0.0f); @@ -81,23 +85,23 @@ uniform float Saturation = 1.0f; float4 ps_main(PS_INPUT Input) : COLOR { float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord); - + float3 OutRGB = BaseTexel.rgb; // RGB Tint & Shift float ShiftedRed = dot(OutRGB, RedRatios); float ShiftedGrn = dot(OutRGB, GrnRatios); float ShiftedBlu = dot(OutRGB, BluRatios); - + // RGB Scale & Offset float3 OutTexel = float3(ShiftedRed, ShiftedGrn, ShiftedBlu) * Scale + Offset; - + // Saturation float3 Grayscale = float3(0.299f, 0.587f, 0.114f); float OutLuma = dot(OutTexel, Grayscale); float3 OutChroma = OutTexel - OutLuma; float3 Saturated = OutLuma + OutChroma * Saturation; - + return float4(Saturated, BaseTexel.a); } @@ -105,7 +109,7 @@ float4 ps_main(PS_INPUT Input) : COLOR // Color-Convolution Technique //----------------------------------------------------------------------------- -technique ColorTechnique +technique DefaultTechnique { pass Pass0 { |