diff --git a/shaders/cBloom.fx b/shaders/cBloom.fx index 7bb7f6c..386ef1a 100644 --- a/shaders/cBloom.fx +++ b/shaders/cBloom.fx @@ -18,38 +18,120 @@ uniform float _Saturation < ui_label = "Saturation"; > = 1.0; +uniform float3 _ColorShift < + ui_type = "color"; + ui_min = 0.0; + ui_label = "Color Shift"; +> = 1.0; + uniform float _Intensity < ui_type = "drag"; ui_min = 0.0; - ui_label = "Intensity"; + ui_label = "Color Intensity"; > = 1.0; texture2D _RenderColor : COLOR; -sampler2D _SampleColor { Texture = _RenderColor; SRGBTexture = TRUE; }; -texture2D _RenderBloom1 { Width = BUFFER_WIDTH / 2; Height = BUFFER_HEIGHT / 2; Format = RGBA16F; }; -sampler2D _SampleBloom1 { Texture = _RenderBloom1; }; +sampler2D _SampleColor +{ + Texture = _RenderColor; SRGBTexture = TRUE; +}; + +texture2D _RenderBloom1 +{ + Width = BUFFER_WIDTH / 2; + Height = BUFFER_HEIGHT / 2; + Format = RGBA16F; +}; + +sampler2D _SampleBloom1 +{ + Texture = _RenderBloom1; +}; + +texture2D _RenderBloom2 +{ + Width = BUFFER_WIDTH / 4; + Height = BUFFER_HEIGHT / 4; + Format = RGBA16F; +}; + +sampler2D _SampleBloom2 +{ + Texture = _RenderBloom2; +}; + +texture2D _RenderBloom3 +{ + Width = BUFFER_WIDTH / 8; + Height = BUFFER_HEIGHT / 8; + Format = RGBA16F; +}; + +sampler2D _SampleBloom3 +{ + Texture = _RenderBloom3; +}; + +texture2D _RenderBloom4 +{ + Width = BUFFER_WIDTH / 16; + Height = BUFFER_HEIGHT / 16; + Format = RGBA16F; +}; -texture2D _RenderBloom2 { Width = BUFFER_WIDTH / 4; Height = BUFFER_HEIGHT / 4; Format = RGBA16F; }; -sampler2D _SampleBloom2 { Texture = _RenderBloom2; }; +sampler2D _SampleBloom4 +{ + Texture = _RenderBloom4; +}; + +texture2D _RenderBloom5 +{ + Width = BUFFER_WIDTH / 32; + Height = BUFFER_HEIGHT / 32; + Format = RGBA16F; +}; -texture2D _RenderBloom3 { Width = BUFFER_WIDTH / 8; Height = BUFFER_HEIGHT / 8; Format = RGBA16F; }; -sampler2D _SampleBloom3 { Texture = _RenderBloom3; }; +sampler2D _SampleBloom5 +{ + Texture = _RenderBloom5; +}; -texture2D _RenderBloom4 { Width = BUFFER_WIDTH / 16; Height = BUFFER_HEIGHT / 16; Format = RGBA16F; }; -sampler2D _SampleBloom4 { Texture = _RenderBloom4; }; +texture2D _RenderBloom6 +{ + Width = BUFFER_WIDTH / 64; + Height = BUFFER_HEIGHT / 64; + Format = RGBA16F; +}; -texture2D _RenderBloom5 { Width = BUFFER_WIDTH / 32; Height = BUFFER_HEIGHT / 32; Format = RGBA16F; }; -sampler2D _SampleBloom5 { Texture = _RenderBloom5; }; +sampler2D _SampleBloom6 +{ + Texture = _RenderBloom6; +}; -texture2D _RenderBloom6 { Width = BUFFER_WIDTH / 64; Height = BUFFER_HEIGHT / 64; Format = RGBA16F; }; -sampler2D _SampleBloom6 { Texture = _RenderBloom6; }; +texture2D _RenderBloom7 +{ + Width = BUFFER_WIDTH / 128; + Height = BUFFER_HEIGHT / 128; + Format = RGBA16F; +}; -texture2D _RenderBloom7 { Width = BUFFER_WIDTH / 128; Height = BUFFER_HEIGHT / 128; Format = RGBA16F; }; -sampler2D _SampleBloom7 { Texture = _RenderBloom7; }; +sampler2D _SampleBloom7 +{ + Texture = _RenderBloom7; +}; -texture2D _RenderBloom8 { Width = BUFFER_WIDTH / 256; Height = BUFFER_HEIGHT / 256; Format = RGBA16F; }; -sampler2D _SampleBloom8 { Texture = _RenderBloom8; }; +texture2D _RenderBloom8 +{ + Width = BUFFER_WIDTH / 256; + Height = BUFFER_HEIGHT / 256; + Format = RGBA16F; +}; + +sampler2D _SampleBloom8 +{ + Texture = _RenderBloom8; +}; /* [ Vertex Shaders ] @@ -57,16 +139,14 @@ sampler2D _SampleBloom8 { Texture = _RenderBloom8; }; [http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare] [MIT] */ -#define VSINPUT in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION - -void PostProcessVS(VSINPUT, inout float2 TexCoord : TEXCOORD0) +void PostProcessVS(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float2 TexCoord : TEXCOORD0) { TexCoord.x = (ID == 2) ? 2.0 : 0.0; TexCoord.y = (ID == 1) ? 2.0 : 0.0; Position = float4(TexCoord * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0); } -void DownsampleVS(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0, float Factor) +void DownsampleVS(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0, float Factor) { float2 TexCoord0; PostProcessVS(ID, Position, TexCoord0); @@ -77,7 +157,7 @@ void DownsampleVS(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0, float Factor) TexCoord[3] = TexCoord0.xyyy + float4(2.0, 2.0, 0.0, -2.0) * pSize.xyyy; // Right column } -void UpsampleVS(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0, float Factor) +void UpsampleVS(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0, float Factor) { float2 TexCoord0; PostProcessVS(ID, Position, TexCoord0); @@ -87,21 +167,75 @@ void UpsampleVS(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0, float Factor) TexCoord[2] = TexCoord0.xyyy + float4(1.0, 1.0, 0.0, -1.0) * pSize.xyyy; // Right column } -void DownsampleVS1(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0) { DownsampleVS(ID, Position, TexCoord, 1.0); } -void DownsampleVS2(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0) { DownsampleVS(ID, Position, TexCoord, 2.0); } -void DownsampleVS3(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0) { DownsampleVS(ID, Position, TexCoord, 3.0); } -void DownsampleVS4(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0) { DownsampleVS(ID, Position, TexCoord, 4.0); } -void DownsampleVS5(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0) { DownsampleVS(ID, Position, TexCoord, 5.0); } -void DownsampleVS6(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0) { DownsampleVS(ID, Position, TexCoord, 6.0); } -void DownsampleVS7(VSINPUT, inout float4 TexCoord[4] : TEXCOORD0) { DownsampleVS(ID, Position, TexCoord, 7.0); } +void DownsampleVS1(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0) +{ + DownsampleVS(ID, Position, TexCoord, 1.0); +} + +void DownsampleVS2(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0) +{ + DownsampleVS(ID, Position, TexCoord, 2.0); +} + +void DownsampleVS3(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0) +{ + DownsampleVS(ID, Position, TexCoord, 3.0); +} -void UpsampleVS8(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0) { UpsampleVS(ID, Position, TexCoord, 8.0); } -void UpsampleVS7(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0) { UpsampleVS(ID, Position, TexCoord, 7.0); } -void UpsampleVS6(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0) { UpsampleVS(ID, Position, TexCoord, 6.0); } -void UpsampleVS5(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0) { UpsampleVS(ID, Position, TexCoord, 5.0); } -void UpsampleVS4(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0) { UpsampleVS(ID, Position, TexCoord, 4.0); } -void UpsampleVS3(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0) { UpsampleVS(ID, Position, TexCoord, 3.0); } -void UpsampleVS2(VSINPUT, inout float4 TexCoord[3] : TEXCOORD0) { UpsampleVS(ID, Position, TexCoord, 2.0); } +void DownsampleVS4(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0) +{ + DownsampleVS(ID, Position, TexCoord, 4.0); +} + +void DownsampleVS5(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0) +{ + DownsampleVS(ID, Position, TexCoord, 5.0); +} + +void DownsampleVS6(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0) +{ + DownsampleVS(ID, Position, TexCoord, 6.0); +} + +void DownsampleVS7(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[4] : TEXCOORD0) +{ + DownsampleVS(ID, Position, TexCoord, 7.0); +} + +void UpsampleVS8(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0) +{ + UpsampleVS(ID, Position, TexCoord, 8.0); +} + +void UpsampleVS7(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0) +{ + UpsampleVS(ID, Position, TexCoord, 7.0); +} + +void UpsampleVS6(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0) +{ + UpsampleVS(ID, Position, TexCoord, 6.0); +} + +void UpsampleVS5(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0) +{ + UpsampleVS(ID, Position, TexCoord, 5.0); +} + +void UpsampleVS4(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0) +{ + UpsampleVS(ID, Position, TexCoord, 4.0); +} + +void UpsampleVS3(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0) +{ + UpsampleVS(ID, Position, TexCoord, 3.0); +} + +void UpsampleVS2(in uint ID : SV_VERTEXID, inout float4 Position : SV_POSITION, inout float4 TexCoord[3] : TEXCOORD0) +{ + UpsampleVS(ID, Position, TexCoord, 2.0); +} /* [ Pixel Shaders ] @@ -187,7 +321,7 @@ void PrefilterPS(float4 Position : SV_POSITION, float2 TexCoord : TEXCOORD0, out // Combine and apply the brightness response curve Color = Color * max(ResponseCurve, Brightness - _Threshold) / max(Brightness, 1e-10); Brightness = max(max(Color.r, Color.g), Color.b); - OutputColor0 = saturate(lerp(Brightness, Color.rgb, _Saturation)); + OutputColor0 = saturate(lerp(Brightness, Color.rgb, _Saturation)) * _ColorShift; OutputColor0.a = 1.0; } @@ -212,23 +346,75 @@ float3 RRTAndODTFit(float3 v) return a / b; } -#define PSINPUT(i) float4 Position : SV_POSITION, float4 TexCoord[i] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0 +void DownsamplePS1(float4 Position : SV_POSITION, float4 TexCoord[4] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = DownsamplePS(_SampleBloom1, TexCoord); +} + +void DownsamplePS2(float4 Position : SV_POSITION, float4 TexCoord[4] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = DownsamplePS(_SampleBloom2, TexCoord); +} + +void DownsamplePS3(float4 Position : SV_POSITION, float4 TexCoord[4] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = DownsamplePS(_SampleBloom3, TexCoord); +} + +void DownsamplePS4(float4 Position : SV_POSITION, float4 TexCoord[4] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = DownsamplePS(_SampleBloom4, TexCoord); +} + +void DownsamplePS5(float4 Position : SV_POSITION, float4 TexCoord[4] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = DownsamplePS(_SampleBloom5, TexCoord); +} + +void DownsamplePS6(float4 Position : SV_POSITION, float4 TexCoord[4] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = DownsamplePS(_SampleBloom6, TexCoord); +} + +void DownsamplePS7(float4 Position : SV_POSITION, float4 TexCoord[4] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = DownsamplePS(_SampleBloom7, TexCoord); +} -void DownsamplePS1(PSINPUT(4)) { OutputColor0 = DownsamplePS(_SampleBloom1, TexCoord); } -void DownsamplePS2(PSINPUT(4)) { OutputColor0 = DownsamplePS(_SampleBloom2, TexCoord); } -void DownsamplePS3(PSINPUT(4)) { OutputColor0 = DownsamplePS(_SampleBloom3, TexCoord); } -void DownsamplePS4(PSINPUT(4)) { OutputColor0 = DownsamplePS(_SampleBloom4, TexCoord); } -void DownsamplePS5(PSINPUT(4)) { OutputColor0 = DownsamplePS(_SampleBloom5, TexCoord); } -void DownsamplePS6(PSINPUT(4)) { OutputColor0 = DownsamplePS(_SampleBloom6, TexCoord); } -void DownsamplePS7(PSINPUT(4)) { OutputColor0 = DownsamplePS(_SampleBloom7, TexCoord); } +void UpsamplePS8(float4 Position : SV_POSITION, float4 TexCoord[3] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = UpsamplePS(_SampleBloom8, TexCoord); +} -void UpsamplePS8(PSINPUT(3)) { OutputColor0 = UpsamplePS(_SampleBloom8, TexCoord); } -void UpsamplePS7(PSINPUT(3)) { OutputColor0 = UpsamplePS(_SampleBloom7, TexCoord); } -void UpsamplePS6(PSINPUT(3)) { OutputColor0 = UpsamplePS(_SampleBloom6, TexCoord); } -void UpsamplePS5(PSINPUT(3)) { OutputColor0 = UpsamplePS(_SampleBloom5, TexCoord); } -void UpsamplePS4(PSINPUT(3)) { OutputColor0 = UpsamplePS(_SampleBloom4, TexCoord); } -void UpsamplePS3(PSINPUT(3)) { OutputColor0 = UpsamplePS(_SampleBloom3, TexCoord); } -void UpsamplePS2(PSINPUT(3)) { OutputColor0 = UpsamplePS(_SampleBloom2, TexCoord); } +void UpsamplePS7(float4 Position : SV_POSITION, float4 TexCoord[3] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = UpsamplePS(_SampleBloom7, TexCoord); +} + +void UpsamplePS6(float4 Position : SV_POSITION, float4 TexCoord[3] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = UpsamplePS(_SampleBloom6, TexCoord); +} + +void UpsamplePS5(float4 Position : SV_POSITION, float4 TexCoord[3] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = UpsamplePS(_SampleBloom5, TexCoord); +} + +void UpsamplePS4(float4 Position : SV_POSITION, float4 TexCoord[3] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = UpsamplePS(_SampleBloom4, TexCoord); +} + +void UpsamplePS3(float4 Position : SV_POSITION, float4 TexCoord[3] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = UpsamplePS(_SampleBloom3, TexCoord); +} + +void UpsamplePS2(float4 Position : SV_POSITION, float4 TexCoord[3] : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) +{ + OutputColor0 = UpsamplePS(_SampleBloom2, TexCoord); +} void CompositePS(float4 Position : SV_POSITION, float2 TexCoord : TEXCOORD0, out float4 OutputColor0 : SV_TARGET0) { @@ -244,21 +430,152 @@ void CompositePS(float4 Position : SV_POSITION, float2 TexCoord : TEXCOORD0, out technique cBloom { - #define BLEND(i, j, k) BlendEnable = TRUE; BlendOp = i; SrcBlend = j; DestBlend = k - pass { VertexShader = PostProcessVS; PixelShader = PrefilterPS; RenderTarget = _RenderBloom1; } - pass { VertexShader = DownsampleVS1; PixelShader = DownsamplePS1; RenderTarget = _RenderBloom2; } - pass { VertexShader = DownsampleVS2; PixelShader = DownsamplePS2; RenderTarget = _RenderBloom3; } - pass { VertexShader = DownsampleVS3; PixelShader = DownsamplePS3; RenderTarget = _RenderBloom4; } - pass { VertexShader = DownsampleVS4; PixelShader = DownsamplePS4; RenderTarget = _RenderBloom5; } - pass { VertexShader = DownsampleVS5; PixelShader = DownsamplePS5; RenderTarget = _RenderBloom6; } - pass { VertexShader = DownsampleVS6; PixelShader = DownsamplePS6; RenderTarget = _RenderBloom7; } - pass { VertexShader = DownsampleVS7; PixelShader = DownsamplePS7; RenderTarget = _RenderBloom8; } - pass { VertexShader = UpsampleVS8; PixelShader = UpsamplePS8; RenderTarget = _RenderBloom7; BLEND(ADD, ONE, ONE); } - pass { VertexShader = UpsampleVS7; PixelShader = UpsamplePS7; RenderTarget = _RenderBloom6; BLEND(ADD, ONE, ONE); } - pass { VertexShader = UpsampleVS6; PixelShader = UpsamplePS6; RenderTarget = _RenderBloom5; BLEND(ADD, ONE, ONE); } - pass { VertexShader = UpsampleVS5; PixelShader = UpsamplePS5; RenderTarget = _RenderBloom4; BLEND(ADD, ONE, ONE); } - pass { VertexShader = UpsampleVS4; PixelShader = UpsamplePS4; RenderTarget = _RenderBloom3; BLEND(ADD, ONE, ONE); } - pass { VertexShader = UpsampleVS3; PixelShader = UpsamplePS3; RenderTarget = _RenderBloom2; BLEND(ADD, ONE, ONE); } - pass { VertexShader = UpsampleVS2; PixelShader = UpsamplePS2; RenderTarget = _RenderBloom1; } - pass { VertexShader = PostProcessVS; PixelShader = CompositePS; BLEND(ADD, ONE, INVSRCCOLOR); SRGBWriteEnable = TRUE; } + pass + { + VertexShader = PostProcessVS; + PixelShader = PrefilterPS; + RenderTarget0 = _RenderBloom1; + } + + pass + { + VertexShader = DownsampleVS1; + PixelShader = DownsamplePS1; + RenderTarget0 = _RenderBloom2; + } + + pass + { + VertexShader = DownsampleVS2; + PixelShader = DownsamplePS2; + RenderTarget0 = _RenderBloom3; + } + + pass + { + VertexShader = DownsampleVS3; + PixelShader = DownsamplePS3; + RenderTarget0 = _RenderBloom4; + } + + pass + { + VertexShader = DownsampleVS4; + PixelShader = DownsamplePS4; + RenderTarget0 = _RenderBloom5; + } + + pass + { + VertexShader = DownsampleVS5; + PixelShader = DownsamplePS5; + RenderTarget0 = _RenderBloom6; + } + + pass + { + VertexShader = DownsampleVS6; + PixelShader = DownsamplePS6; + RenderTarget0 = _RenderBloom7; + } + + pass + { + VertexShader = DownsampleVS7; + PixelShader = DownsamplePS7; + RenderTarget0 = _RenderBloom8; + } + + pass + { + VertexShader = UpsampleVS8; + PixelShader = UpsamplePS8; + RenderTarget0 = _RenderBloom7; + ClearRenderTargets = FALSE; + BlendEnable = TRUE; + BlendOp = ADD; + SrcBlend = ONE; + DestBlend = ONE; + } + + pass + { + VertexShader = UpsampleVS7; + PixelShader = UpsamplePS7; + RenderTarget0 = _RenderBloom6; + ClearRenderTargets = FALSE; + BlendEnable = TRUE; + BlendOp = ADD; + SrcBlend = ONE; + DestBlend = ONE; + } + + pass + { + VertexShader = UpsampleVS6; + PixelShader = UpsamplePS6; + RenderTarget0 = _RenderBloom5; + ClearRenderTargets = FALSE; + BlendEnable = TRUE; + BlendOp = ADD; + SrcBlend = ONE; + DestBlend = ONE; + } + + pass + { + VertexShader = UpsampleVS5; + PixelShader = UpsamplePS5; + RenderTarget0 = _RenderBloom4; + ClearRenderTargets = FALSE; + BlendEnable = TRUE; + BlendOp = ADD; + SrcBlend = ONE; + DestBlend = ONE; + } + + pass + { + VertexShader = UpsampleVS4; + PixelShader = UpsamplePS4; + RenderTarget0 = _RenderBloom3; + ClearRenderTargets = FALSE; + BlendEnable = TRUE; + BlendOp = ADD; + SrcBlend = ONE; + DestBlend = ONE; + } + + pass + { + VertexShader = UpsampleVS3; + PixelShader = UpsamplePS3; + RenderTarget0 = _RenderBloom2; + ClearRenderTargets = FALSE; + BlendEnable = TRUE; + BlendOp = ADD; + SrcBlend = ONE; + DestBlend = ONE; + } + + pass + { + VertexShader = UpsampleVS2; + PixelShader = UpsamplePS2; + RenderTarget0 = _RenderBloom1; + ClearRenderTargets = FALSE; + BlendEnable = FALSE; + } + + pass + { + VertexShader = PostProcessVS; + PixelShader = CompositePS; + ClearRenderTargets = FALSE; + BlendEnable = TRUE; + BlendOp = ADD; + SrcBlend = ONE; + DestBlend = INVSRCCOLOR; + SRGBWriteEnable = TRUE; + } }