diff --git a/hlsl/artwork_support/distortion.fx b/hlsl/artwork_support/distortion.fx index 65896bceb9..333363afeb 100644 --- a/hlsl/artwork_support/distortion.fx +++ b/hlsl/artwork_support/distortion.fx @@ -4,6 +4,10 @@ // Distortion Effect //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Sampler Definitions +//----------------------------------------------------------------------------- + texture DiffuseTexture; sampler DiffuseSampler = sampler_state @@ -85,7 +89,7 @@ float4 ps_main(PS_INPUT Input) : COLOR // Distortion Effect //----------------------------------------------------------------------------- -technique DistortionTechnique +technique DefaultTechnique { pass Pass0 { diff --git a/hlsl/artwork_support/post.fx b/hlsl/artwork_support/post.fx index e7618bafd0..48530272c9 100644 --- a/hlsl/artwork_support/post.fx +++ b/hlsl/artwork_support/post.fx @@ -1,7 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- -// Scanline & Shadowmask Effect +// Scanline, Shadowmask & Distortion Effect +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Sampler Definitions //----------------------------------------------------------------------------- texture DiffuseTexture; @@ -98,7 +102,7 @@ float roundBox(float2 p, float2 b, float r) } //----------------------------------------------------------------------------- -// Scanline & Shadowmask Vertex Shader +// Scanline, Shadowmask & Distortion Vertex Shader //----------------------------------------------------------------------------- uniform float2 ScreenDims; // size of the window or fullscreen @@ -149,7 +153,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Post-Processing Pixel Shader +// Scanline, Shadowmask & Distortion Pixel Shader //----------------------------------------------------------------------------- uniform float2 ScreenScale = float2(1.0f, 1.0f); @@ -511,14 +515,12 @@ float4 ps_main(PS_INPUT Input) : COLOR // Scanline & Shadowmask Effect //----------------------------------------------------------------------------- -technique ScanMaskTechnique +technique DefaultTechnique { pass Pass0 { Lighting = FALSE; - //Sampler[0] = ; - VertexShader = compile vs_3_0 vs_main(); PixelShader = compile ps_3_0 ps_main(); } diff --git a/hlsl/bloom.fx b/hlsl/bloom.fx index f766bf9ee3..9fabe14efc 100644 --- a/hlsl/bloom.fx +++ b/hlsl/bloom.fx @@ -1,7 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- -// Effect File Variables +// Bloom Effect +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Sampler Definitions //----------------------------------------------------------------------------- texture DiffuseA; @@ -304,13 +308,13 @@ float4 ps_main(PS_INPUT Input) : COLOR float2 NoiseCoord = Input.TexCoord01.xy; float3 NoiseFactor = GetNoiseFactor(bloom, random(NoiseCoord)); - + blend = texel0 + bloom * NoiseFactor; } // darken else - { + { texel1 = min(texel0, texel1); texel2 = min(texel0, texel2); texel3 = min(texel0, texel3); @@ -339,27 +343,15 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Bloom Effect +// Bloom Technique //----------------------------------------------------------------------------- -technique TestTechnique +technique DefaultTechnique { pass Pass0 { Lighting = FALSE; - Sampler[0] = ; // 2048x2048 - Sampler[1] = ; // 1024x1024 - Sampler[2] = ; // 512x512 - Sampler[3] = ; // 256x256 - Sampler[4] = ; // 128x128 - Sampler[5] = ; // 64x64 - Sampler[6] = ; // 32x32 - Sampler[7] = ; // 16x16 - Sampler[8] = ; // 8x8 - Sampler[9] = ; // 4x4 - Sampler[10] = ; // 2x2 - VertexShader = compile vs_3_0 vs_main(); PixelShader = compile ps_3_0 ps_main(); } diff --git a/hlsl/color.fx b/hlsl/color.fx index 7724eeb10f..79f55260d4 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 { diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx index 3de37764e4..6ff5c287a7 100644 --- a/hlsl/deconverge.fx +++ b/hlsl/deconverge.fx @@ -4,6 +4,10 @@ // Deconvergence Effect //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Sampler Definitions +//----------------------------------------------------------------------------- + texture Diffuse; sampler DiffuseSampler = sampler_state @@ -112,10 +116,10 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Deconvergence Effect +// Deconvergence Technique //----------------------------------------------------------------------------- -technique DeconvergeTechnique +technique DefaultTechnique { pass Pass0 { diff --git a/hlsl/distortion.fx b/hlsl/distortion.fx index 77c7ddcd3e..f9dd51b697 100644 --- a/hlsl/distortion.fx +++ b/hlsl/distortion.fx @@ -4,6 +4,10 @@ // Distortion Effect //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Sampler Definitions +//----------------------------------------------------------------------------- + texture DiffuseTexture; sampler DiffuseSampler = sampler_state @@ -109,7 +113,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Post-Processing Pixel Shader +// Distortion Pixel Shader //----------------------------------------------------------------------------- uniform float CurvatureAmount = 0.0f; @@ -299,10 +303,10 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Distortion Effect +// Distortion Technique //----------------------------------------------------------------------------- -technique DistortionTechnique +technique DefaultTechnique { pass Pass0 { diff --git a/hlsl/downsample.fx b/hlsl/downsample.fx index 4a4a8fe374..9ac584b56f 100644 --- a/hlsl/downsample.fx +++ b/hlsl/downsample.fx @@ -1,7 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- -// Effect File Variables +// Downsample Effect +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Sampler Definitions //----------------------------------------------------------------------------- texture DiffuseTexture; @@ -96,17 +100,15 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Downsample Effect +// Downsample Technique //----------------------------------------------------------------------------- -technique TestTechnique +technique DefaultTechnique { pass Pass0 { Lighting = FALSE; - Sampler[0] = ; - VertexShader = compile vs_2_0 vs_main(); PixelShader = compile ps_2_0 ps_main(); } diff --git a/hlsl/focus.fx b/hlsl/focus.fx index af0d9314d3..6da8ab928a 100644 --- a/hlsl/focus.fx +++ b/hlsl/focus.fx @@ -1,7 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- -// Effect File Variables +// Defocus Effect +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Sampler Definitions //----------------------------------------------------------------------------- texture Diffuse; @@ -51,7 +55,7 @@ bool xor(bool a, bool b) } //----------------------------------------------------------------------------- -// Simple Vertex Shader +// Defocus Vertex Shader //----------------------------------------------------------------------------- uniform float2 ScreenDims; @@ -80,7 +84,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Simple Pixel Shader +// Defocus Pixel Shader //----------------------------------------------------------------------------- float2 Coord1Offset = float2( 0.75f, 0.50f); @@ -124,17 +128,15 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Simple Effect +// Defocus Technique //----------------------------------------------------------------------------- -technique TestTechnique +technique DefaultTechnique { pass Pass0 { Lighting = FALSE; - Sampler[0] = ; - VertexShader = compile vs_2_0 vs_main(); PixelShader = compile ps_2_0 ps_main(); } diff --git a/hlsl/phosphor.fx b/hlsl/phosphor.fx index 13c7700e2e..7d665b4474 100644 --- a/hlsl/phosphor.fx +++ b/hlsl/phosphor.fx @@ -1,7 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz //----------------------------------------------------------------------------- -// Effect File Variables +// Phosphor Effect +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Sampler Definitions //----------------------------------------------------------------------------- texture Diffuse; @@ -57,7 +61,7 @@ struct PS_INPUT }; //----------------------------------------------------------------------------- -// Simple Vertex Shader +// Phosphor Vertex Shader //----------------------------------------------------------------------------- uniform float2 ScreenDims; @@ -86,7 +90,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Simple Pixel Shader +// Phosphor Pixel Shader //----------------------------------------------------------------------------- uniform float3 Phosphor = float3(0.0f, 0.0f, 0.0f); @@ -106,18 +110,15 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Simple Effect +// Phosphor Technique //----------------------------------------------------------------------------- -technique TestTechnique +technique DefaultTechnique { pass Pass0 { Lighting = FALSE; - Sampler[0] = ; - Sampler[1] = ; - VertexShader = compile vs_2_0 vs_main(); PixelShader = compile ps_2_0 ps_main(); } diff --git a/hlsl/pincushion.fx b/hlsl/pincushion.fx deleted file mode 100644 index 7968363c1d..0000000000 --- a/hlsl/pincushion.fx +++ /dev/null @@ -1,126 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Ryan Holtz -//----------------------------------------------------------------------------- -// Pincushion Post-Processing Effect -//----------------------------------------------------------------------------- - -texture Diffuse; - -sampler DiffuseSampler = sampler_state -{ - Texture = ; - MipFilter = LINEAR; - MinFilter = LINEAR; - MagFilter = LINEAR; - AddressU = CLAMP; - AddressV = CLAMP; - AddressW = CLAMP; -}; - -//----------------------------------------------------------------------------- -// Vertex Definitions -//----------------------------------------------------------------------------- - -struct VS_OUTPUT -{ - float4 Position : POSITION; - float4 Color : COLOR0; - float2 TexCoord : TEXCOORD0; - float2 RedCoord : TEXCOORD2; - float2 GreenCoord : TEXCOORD3; - float2 BlueCoord : TEXCOORD4; -}; - -struct VS_INPUT -{ - float3 Position : POSITION; - float4 Color : COLOR0; - float2 TexCoord : TEXCOORD0; - float2 Unused : TEXCOORD1; -}; - -struct PS_INPUT -{ - float4 Color : COLOR0; - float2 TexCoord : TEXCOORD0; - float2 RedCoord : TEXCOORD2; - float2 GreenCoord : TEXCOORD3; - float2 BlueCoord : TEXCOORD4; -}; - -//----------------------------------------------------------------------------- -// Post-Processing Vertex Shader -//----------------------------------------------------------------------------- - -uniform float TargetWidth; -uniform float TargetHeight; - -uniform float RawWidth; -uniform float RawHeight; - -VS_OUTPUT vs_main(VS_INPUT Input) -{ - VS_OUTPUT Output = (VS_OUTPUT)0; - - float2 invDims = float2(1.0f / RawWidth, 1.0f / RawHeight); - Output.Position = float4(Input.Position.xyz, 1.0f); - Output.Position.x /= TargetWidth; - Output.Position.y /= TargetHeight; - Output.Position.y = 1.0f - Output.Position.y; - Output.Position.x -= 0.5f; - Output.Position.y -= 0.5f; - Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f); - Output.Color = Input.Color; - Output.TexCoord = Input.TexCoord; - - Output.TexCoord.x -= 0.25f; - Output.TexCoord.y -= 0.25f; - Output.TexCoord.x -= 0.5f; - Output.TexCoord.y -= 0.5f; - Output.TexCoord.x /= 18.0f * (TargetWidth / RawWidth); - Output.TexCoord.y /= 18.0f * (TargetHeight / RawHeight); - Output.TexCoord.x += 0.5f; - Output.TexCoord.y += 0.5f; - - return Output; -} - -//----------------------------------------------------------------------------- -// Post-Processing Pixel Shader -//----------------------------------------------------------------------------- - -uniform float PI = 3.14159265f; - -uniform float PincushionAmountX = 0.1f; -uniform float PincushionAmountY = 0.1f; - -uniform float2 ActiveArea; - -float4 ps_main(PS_INPUT Input) : COLOR -{ - // -- Screen Pincushion Calculation -- - float2 UnitCoord = Input.TexCoord * ActiveArea * 2.0f - 1.0f; - - float PincushionR2 = pow(length(UnitCoord),2.0f) / pow(length(ActiveArea), 2.0f); - float2 PincushionCurve = UnitCoord * PincushionAmountX * PincushionR2; - float2 BaseCoord = Input.TexCoord + PincushionCurve; - - return tex2D(DiffuseSampler, BaseCoord); -} - -//----------------------------------------------------------------------------- -// Post-Processing Effect -//----------------------------------------------------------------------------- - -technique TestTechnique -{ - pass Pass0 - { - Lighting = FALSE; - - Sampler[0] = ; - - VertexShader = compile vs_2_0 vs_main(); - PixelShader = compile ps_2_0 ps_main(); - } -} diff --git a/hlsl/post.fx b/hlsl/post.fx index 39548bcf73..2b175dedf9 100644 --- a/hlsl/post.fx +++ b/hlsl/post.fx @@ -4,6 +4,10 @@ // Scanline & Shadowmask Effect //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Sampler Definitions +//----------------------------------------------------------------------------- + texture DiffuseTexture; sampler DiffuseSampler = sampler_state @@ -121,7 +125,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Post-Processing Pixel Shader +// Scanline & Shadowmask Pixel Shader //----------------------------------------------------------------------------- uniform float2 ScreenScale = float2(1.0f, 1.0f); @@ -264,17 +268,15 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Scanline & Shadowmask Effect +// Scanline & Shadowmask Technique //----------------------------------------------------------------------------- -technique ScanMaskTechnique +technique DefaultTechnique { pass Pass0 { Lighting = FALSE; - Sampler[0] = ; - VertexShader = compile vs_3_0 vs_main(); PixelShader = compile ps_3_0 ps_main(); } diff --git a/hlsl/prescale.fx b/hlsl/prescale.fx index 16df349c58..33b2a4efb0 100644 --- a/hlsl/prescale.fx +++ b/hlsl/prescale.fx @@ -1,7 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz //----------------------------------------------------------------------------- -// Passthrough Effect +// Prescale Effect +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Sampler Definitions //----------------------------------------------------------------------------- texture Diffuse; @@ -41,7 +45,7 @@ struct PS_INPUT }; //----------------------------------------------------------------------------- -// Passthrough Vertex Shader +// Prescale Vertex Shader //----------------------------------------------------------------------------- uniform float2 ScreenDims; @@ -62,7 +66,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Passthrough Pixel Shader +// Prescale Pixel Shader //----------------------------------------------------------------------------- float4 ps_main(PS_INPUT Input) : COLOR @@ -71,10 +75,10 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Passthrough Effect +// Prescale Technique //----------------------------------------------------------------------------- -technique DeconvergeTechnique +technique DefaultTechnique { pass Pass0 { diff --git a/hlsl/primary.fx b/hlsl/primary.fx index 130c1cd470..f0a1c1da0e 100644 --- a/hlsl/primary.fx +++ b/hlsl/primary.fx @@ -1,7 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz //----------------------------------------------------------------------------- -// Effect File Variables +// Primary Effect +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Sampler Definitions //----------------------------------------------------------------------------- texture Diffuse; @@ -42,7 +46,7 @@ struct PS_INPUT }; //----------------------------------------------------------------------------- -// Simple Vertex Shader +// Primary Vertex Shader //----------------------------------------------------------------------------- static const float Epsilon = 1.0e-7f; @@ -79,7 +83,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Simple Pixel Shader +// Primary Pixel Shader //----------------------------------------------------------------------------- float4 ps_main(PS_INPUT Input) : COLOR @@ -91,17 +95,15 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Simple Effect +// Primary Technique //----------------------------------------------------------------------------- -technique TestTechnique +technique DefaultTechnique { pass Pass0 { Lighting = FALSE; - Sampler[0] = ; - VertexShader = compile vs_2_0 vs_main(); PixelShader = compile ps_2_0 ps_main(); } diff --git a/hlsl/vector.fx b/hlsl/vector.fx index 19267453f3..1e94042ad5 100644 --- a/hlsl/vector.fx +++ b/hlsl/vector.fx @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz //----------------------------------------------------------------------------- -// Effect File Variables +// Vector Effect //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -32,7 +32,7 @@ struct PS_INPUT }; //----------------------------------------------------------------------------- -// Simple Vertex Shader +// Vector Vertex Shader //----------------------------------------------------------------------------- uniform float2 ScreenDims; @@ -59,7 +59,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) } //----------------------------------------------------------------------------- -// Simple Pixel Shader +// Vector Pixel Shader //----------------------------------------------------------------------------- // TimeParams.x: Frame time of the vector @@ -80,10 +80,10 @@ float4 ps_main(PS_INPUT Input) : COLOR } //----------------------------------------------------------------------------- -// Simple Effect +// Vector Technique //----------------------------------------------------------------------------- -technique TestTechnique +technique DefaultTechnique { pass Pass0 { diff --git a/hlsl/yiq_decode.fx b/hlsl/yiq_decode.fx index c7526fbe87..10575a26bb 100644 --- a/hlsl/yiq_decode.fx +++ b/hlsl/yiq_decode.fx @@ -4,6 +4,10 @@ // YIQ Decode Effect //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Sampler Definitions +//----------------------------------------------------------------------------- + texture Composite; sampler CompositeSampler = sampler_state @@ -64,7 +68,7 @@ uniform float2 SourceRect; VS_OUTPUT vs_main(VS_INPUT Input) { VS_OUTPUT Output = (VS_OUTPUT)0; - + Output.Position = float4(Input.Position.xyz, 1.0f); Output.Position.xy /= ScreenDims; Output.Position.y = 1.0f - Output.Position.y; @@ -151,23 +155,23 @@ float4 ps_main(PS_INPUT Input) : COLOR float4 IdealI = Fc_i_2 * ((SincIIn != 0.0f) ? (sin(SincIIn) / SincIIn) : 1.0f); float4 IdealQ = Fc_q_2 * ((SincQIn != 0.0f) ? (sin(SincQIn) / SincQIn) : 1.0f); - float4 FilterY = SincKernel * IdealY; + float4 FilterY = SincKernel * IdealY; float4 FilterI = SincKernel * IdealI; float4 FilterQ = SincKernel * IdealQ; - + YAccum = YAccum + C * FilterY; IAccum = IAccum + C * cos(WT) * FilterI; QAccum = QAccum + C * sin(WT) * FilterQ; } - + float Y = YAccum.r + YAccum.g + YAccum.b + YAccum.a; float I = (IAccum.r + IAccum.g + IAccum.b + IAccum.a) * 2.0f; float Q = (QAccum.r + QAccum.g + QAccum.b + QAccum.a) * 2.0f; - + float3 YIQ = float3(Y, I, Q); float3 OutRGB = float3(dot(YIQ, float3(1.0f, 0.956f, 0.621f)), dot(YIQ, float3(1.0f, -0.272f, -0.647f)), dot(YIQ, float3(1.0f, -1.106f, 1.703f))); - + return float4(OutRGB, BaseTexel.a); } @@ -175,7 +179,7 @@ float4 ps_main(PS_INPUT Input) : COLOR // YIQ Decode Technique //----------------------------------------------------------------------------- -technique DecodeTechnique +technique DefaultTechnique { pass Pass0 { diff --git a/hlsl/yiq_encode.fx b/hlsl/yiq_encode.fx index e35062f072..97470c10d1 100644 --- a/hlsl/yiq_encode.fx +++ b/hlsl/yiq_encode.fx @@ -4,6 +4,10 @@ // YIQ Encode Effect //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Sampler Definitions +//----------------------------------------------------------------------------- + texture Diffuse; sampler DiffuseSampler = sampler_state @@ -51,7 +55,7 @@ uniform float2 ScreenDims; VS_OUTPUT vs_main(VS_INPUT Input) { VS_OUTPUT Output = (VS_OUTPUT)0; - + Output.Position = float4(Input.Position.xyz, 1.0f); Output.Position.xy /= ScreenDims; Output.Position.y = 1.0f - Output.Position.y; @@ -59,7 +63,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f); Output.Color = Input.Color; Output.TexCoord = Input.TexCoord; - + return Output; } @@ -99,7 +103,7 @@ float4 ps_main(PS_INPUT Input) : COLOR float4 Texel1 = tex2D(DiffuseSampler, float2(CoordX.y, CoordY.y) + TexelOffset); float4 Texel2 = tex2D(DiffuseSampler, float2(CoordX.z, CoordY.z) + TexelOffset); float4 Texel3 = tex2D(DiffuseSampler, float2(CoordX.w, CoordY.w) + TexelOffset); - + float4 Y = float4(dot(Texel0, YDot), dot(Texel1, YDot), dot(Texel2, YDot), dot(Texel3, YDot)); float4 I = float4(dot(Texel0, IDot), dot(Texel1, IDot), dot(Texel2, IDot), dot(Texel3, IDot)); float4 Q = float4(dot(Texel0, QDot), dot(Texel1, QDot), dot(Texel2, QDot), dot(Texel3, QDot)); @@ -107,10 +111,10 @@ float4 ps_main(PS_INPUT Input) : COLOR float4 W = PI2 * CCValue * ScanTime; float4 VPosition = (CoordY * SourceRect.y) * (SourceDims.x / SourceRect.x); float4 T = CoordX / SourceRect.x + VPosition + BValue; - + float4 C = Y + I * cos(T * W) + Q * sin(T * W); C = (C - MinC) / CRange; - + return C; } @@ -118,7 +122,7 @@ float4 ps_main(PS_INPUT Input) : COLOR // YIQ Encode Technique //----------------------------------------------------------------------------- -technique EncodeTechnique +technique DefaultTechnique { pass Pass0 { diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index a37a0c8653..a7333a14d0 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -1072,15 +1072,20 @@ void shaders::begin_draw() curr_effect = default_effect; - default_effect->set_technique("TestTechnique"); - post_effect->set_technique("ScanMaskTechnique"); - distortion_effect->set_technique("DistortionTechnique"); - phosphor_effect->set_technique("TestTechnique"); - focus_effect->set_technique("TestTechnique"); - deconverge_effect->set_technique("DeconvergeTechnique"); - color_effect->set_technique("ColorTechnique"); - yiq_encode_effect->set_technique("EncodeTechnique"); - yiq_decode_effect->set_technique("DecodeTechnique"); + default_effect->set_technique("DefaultTechnique"); + post_effect->set_technique("DefaultTechnique"); + distortion_effect->set_technique("DefaultTechnique"); + prescale_effect->set_technique("DefaultTechnique"); + phosphor_effect->set_technique("DefaultTechnique"); + focus_effect->set_technique("DefaultTechnique"); + deconverge_effect->set_technique("DefaultTechnique"); + color_effect->set_technique("DefaultTechnique"); + yiq_encode_effect->set_technique("DefaultTechnique"); + yiq_decode_effect->set_technique("DefaultTechnique"); + color_effect->set_technique("DefaultTechnique"); + bloom_effect->set_technique("DefaultTechnique"); + downsample_effect->set_technique("DefaultTechnique"); + vector_effect->set_technique("DefaultTechnique"); HRESULT result = (*d3dintf->device.get_render_target)(d3d->get_device(), 0, &backbuffer); if (result != D3D_OK)