// EMERGENT GAME TECHNOLOGIES PROPRIETARY INFORMATION // // This software is supplied under the terms of a license agreement or // nondisclosure agreement with Emergent Game Technologies and may not // be copied or disclosed except in accordance with the terms of that // agreement. // // Copyright (c) 1996-2006 Emergent Game Technologies. // All Rights Reserved. // // Emergent Game Technologies, Chapel Hill, North Carolina 27517 // http://www.emergent.net //--------------------------------------------------------------------------- // MRTEffects.fx // Implements a set of image post-processing effects that use multiple render // targets. // // The effects implemented here include: // // MRT_NightVision - blur and depth of field with noise // MRT_NormalEdgeDetect - edge detection achieved by comparing per-pixel // normals // MRT_PassThrough - simply outputs the color texture with no modifications //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Textures and Samplers //--------------------------------------------------------------------------- texture g_texSrcColor; sampler2D g_samSrcColor = sampler_state { Texture = (g_texSrcColor); AddressU = Clamp; AddressV = Clamp; MinFilter = Point; MagFilter = Linear; MipFilter = Linear; }; texture g_texSrcNormPos; sampler2D g_samSrcNormPos = sampler_state { Texture = (g_texSrcNormPos); AddressU = Clamp; AddressV = Clamp; MinFilter = Point; MagFilter = Linear; MipFilter = Linear; }; texture g_texSrcAux; sampler2D g_samSrcAux = sampler_state { Texture = (g_texSrcAux); AddressU = Clamp; AddressV = Clamp; MinFilter = Point; MagFilter = Linear; MipFilter = Linear; }; texture g_texIRRamp; sampler1D g_samIRRamp = sampler_state { Texture = (g_texIRRamp); AddressU = Clamp; MinFilter = Point; MagFilter = Linear; MipFilter = Linear; }; texture g_texNoise < string NTM = "Base"; >; sampler2D g_samNoise = sampler_state { Texture = (g_texNoise); AddressU = Clamp; AddressV = Clamp; MinFilter = Point; MagFilter = Linear; MipFilter = Linear; }; texture ShaderMap4 < string NTM = "shader"; int NTMIndex = 4; >; sampler2D ShaderMap4Sampler = sampler_state { Texture = ; MinFilter = Point; MagFilter = Linear; MipFilter = Linear; }; texture ShaderMap5 < string NTM = "shader"; int NTMIndex = 5; >; sampler2D ShaderMap5Sampler = sampler_state { Texture = ; MinFilter = Point; MagFilter = Linear; MipFilter = Linear; }; float g_BlurAccAmount : GLOBAL = 0.0f; //--------------------------------------------------------------------------- // Constants //--------------------------------------------------------------------------- float rad : GLOBAL = 30.0f; float threshold : GLOBAL = 0.35f; float3 fk3f[32] : GLOBAL = { {0.087924, 0.143345, 0.883847}, {0.402081, 0.248512, -0.354778}, {-0.771966, 0.417280, 0.266030}, {-0.192419, -0.707266, 0.099948}, {-0.008820, 0.077548, -0.556688}, {0.756951, 0.524338, 0.319010}, {-0.069491, -0.908078, -0.049104}, {-0.563097, 0.511948, 0.522568}, {0.278909, 0.159703, 0.524094}, {0.042451, 0.757500, 0.488388}, {-0.392071, 0.491256, 0.579394}, {-0.608142, 0.468062, 0.591845}, {0.057100, -0.529099, 0.842586}, {0.545579, 0.232398, -0.195288}, {-0.647572, 0.426008, -0.476974}, {-0.124302, -0.903867, -0.030427}, {0.059908, -0.984802, -0.119114}, {0.643055, -0.381512, -0.110202}, {-0.467452, 0.084567, 0.435591}, {-0.523179, 0.228614, 0.444380}, {0.554796, 0.437788, -0.315836}, {0.076449, -0.040376, -0.347148}, {-0.249245, -0.693533, -0.054659}, {-0.560656, 0.250954, -0.786798}, {0.726798, 0.159032, -0.293252}, {0.129002, -0.310953, -0.699576}, {-0.190832, 0.601367, -0.770501}, {-0.549181, 0.109043, 0.248878}, {0.243263, -0.251869, -0.419294}, {-0.393658, 0.263222, -0.819697}, {0.824641, 0.304361, 0.022797}, {0.643483, -0.421125, 0.629261} }; static const int gs_iEdgeDetectKernelSize = 4; float2 g_vEdgeDetectTexelKernel[gs_iEdgeDetectKernelSize] : GLOBAL; static const int gs_iBlurKernelSize = 13; float2 g_vBlurTexelKernelX[gs_iBlurKernelSize] : GLOBAL; float2 g_vBlurTexelKernelY[gs_iBlurKernelSize] : GLOBAL; static const float gs_vBlurWeights[gs_iBlurKernelSize] = { 0.002216, 0.008764, 0.026995, 0.064759, 0.120985, 0.176033, 0.199471, 0.176033, 0.120985, 0.064759, 0.026995, 0.008764, 0.002216 }; static const int gs_iBlurDiagonalKernelSize = 5; float2 g_vBlurDiagonalOffsets[gs_iBlurDiagonalKernelSize] : GLOBAL; float4 g_vBlurDiagonalWeights[gs_iBlurDiagonalKernelSize] : GLOBAL; static const float3 gs_vLuminanceConv = {0.2125, 0.7154, 0.0721}; static const float4 gs_vNightVisionMainColor : GLOBAL = {0.5, 0.7, 0.5, 1}; static const float4 gs_vNightVisionAltColor : GLOBAL = {0.3, 0.3, 1, 1}; float4x4 g_matWorldViewProj : WORLDVIEWPROJECTION; float4x4 matModelToProj : WORLDVIEWPROJ; float4x4 g_invViewProj : GLOBAL; float4x4 g_prevViewProj : GLOBAL; float2 g_cameraFarNearPlane : GLOBAL; float g_cameraDirDotMove : GLOBAL = 0; float2 g_frustum_tmp : GLOBAL; float g_fNearFarScale : GLOBAL = 5600; float g_fPerturbationMultiplier : GLOBAL = 0.01; float g_fTrailDistance : GLOBAL = 0.5; float g_fTrailWidth : GLOBAL = 0.5; float g_fBlurFactor : GLOBAL = 0.59; float g_fDOFDistance : GLOBAL = 6000; float g_fDOFFalloff : GLOBAL = 15700; float g_fShimmerBrightness : GLOBAL = 1; float g_fEdgeDepthThreshold : GLOBAL = 0.1; //--------------------------------------------------------------------------- // Functions //--------------------------------------------------------------------------- float4 BlurColorX(float2 vTexCoord) { // Blurs the texel at vTexCoord in the X direction. float4 vColor = 0; for (int i = 0; i < gs_iBlurKernelSize; i++) { vColor += tex2D(g_samSrcColor, vTexCoord + g_vBlurTexelKernelX[i] * g_fBlurFactor) * gs_vBlurWeights[i]; } return vColor; } //--------------------------------------------------------------------------- float4 BlurColorY(float2 vTexCoord) { // Blurs the texel at vTexCoord in the Y direction. float4 vColor = 0; for (int i = 0; i < gs_iBlurKernelSize; i++) { vColor += tex2D(g_samSrcColor, vTexCoord + g_vBlurTexelKernelY[i] * g_fBlurFactor) * gs_vBlurWeights[i]; } return vColor; } //--------------------------------------------------------------------------- float4 BlurDiagonal(float2 vTexCoord) { float4 vColor = 0; for (int i = 0; i < gs_iBlurDiagonalKernelSize; i++) { vColor += g_vBlurDiagonalWeights[i] * tex2D(g_samSrcColor, vTexCoord + g_vBlurDiagonalOffsets[i] * g_fBlurFactor); } return vColor; } //--------------------------------------------------------------------------- float GetZDepth(float2 vTexCoord) { return tex2D(g_samSrcColor, vTexCoord).w; } //--------------------------------------------------------------------------- float4 ApplyDepthOfFieldX(float4 vOrigColor, float2 vTexCoord, float fZDepth) { // Applies a depth of field effect to the texel at vTexCoord with blur // in the X direction. float fDepth = smoothstep(g_fDOFDistance, g_fDOFDistance + g_fDOFFalloff, fZDepth); return (fDepth * BlurColorX(vTexCoord)) + ((1 - fDepth) * vOrigColor); } //--------------------------------------------------------------------------- float4 ApplyDepthOfFieldY(float4 vOrigColor, float2 vTexCoord, float fZDepth) { // Applies a depth of field effect to the texel at vTexCoord with blur // in the Y direction. float fDepth = smoothstep(g_fDOFDistance, g_fDOFDistance + g_fDOFFalloff, fZDepth); return (fDepth * BlurColorY(vTexCoord)) + ((1 - fDepth) * vOrigColor); } //--------------------------------------------------------------------------- float GetLuminance(float4 vOrigColor) { return dot(vOrigColor, gs_vLuminanceConv); } //--------------------------------------------------------------------------- float4 GetNightVisionColor(float4 vOrigColor, float4 vTintColor) { return GetLuminance(vOrigColor) * vTintColor; } //--------------------------------------------------------------------------- float4 ApplyNoise(float4 vOrigColor, float2 vTexCoord) { return vOrigColor * tex2D(g_samNoise, vTexCoord); } //--------------------------------------------------------------------------- float4 ApplyMotionBlur(float4 vOrigColor, float2 vTexCoord, float fZDepth) { // float4 worldPos = float4(Input.EyePos+normalize(Input.EyeRay)*depth,1); float Q = g_cameraFarNearPlane.y / ( g_cameraFarNearPlane.y - g_cameraFarNearPlane.x ); float2 depthparameter = float2(Q, -Q*g_cameraFarNearPlane.x); //float depthW = depth;//max(0,depth-g_cameraFarNearPlane.x); float zoverW = (fZDepth * depthparameter.x + depthparameter.y) ; //return float4(zoverW.xxx/2,1); float4 projPos = float4(vTexCoord.x*2-1, (1-vTexCoord.y)*2-1,saturate(zoverW/fZDepth),1);//zoverW, depthW); float4 worldPos = mul(projPos, g_invViewProj); worldPos /= worldPos.w; //return worldPos/1000; float4 prevProjPos = mul(worldPos, g_prevViewProj); prevProjPos /= prevProjPos.w; //float cut = prevProjPos.z - projPos.z; //if (cut>0) //{ float2 velocity = ( prevProjPos.xy - projPos.xy )/2.0f; //return float4(velocity*10,0,1); velocity = -velocity; float2 adjust = velocity * 0.1 * saturate(pow(length(projPos.xy+float2(0,1))*0.5,2)); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*2).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*3).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*4).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*5).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*6).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*7).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*8).xyz, 1.0F); vOrigColor += float4(tex2D(g_samSrcColor, vTexCoord+adjust*9).xyz, 1.0F); vOrigColor /= 10; //color*=saturate(depthW+length(projPos.xy+float2(0,1))*0.5); //} return vOrigColor; } //--------------------------------------------------------------------------- // Vertex Shaders //--------------------------------------------------------------------------- struct VS_OUTPUT { float4 Pos : POSITION; float2 Tex0 : TEXCOORD0; }; VS_OUTPUT VSMain(float4 inPos: POSITION, float2 inTex0: TEXCOORD0) { VS_OUTPUT Out; Out.Pos = mul(inPos, g_matWorldViewProj); Out.Tex0 = inTex0; return Out; } //--------------------------------------------------------------------------- // Pixel Shaders //--------------------------------------------------------------------------- float4 NightVision_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { float4 vColor = tex2D(g_samSrcColor, vTexCoord); float fMask = tex2D(g_samSrcAux, vTexCoord).b; if (any(fMask)) { // Night vision conversion based on luminance. vColor = GetNightVisionColor(vColor, gs_vNightVisionAltColor); } else { // Diagonal Gaussian blur. vColor = BlurDiagonal(vTexCoord); // Night vision conversion based on luminance. vColor = GetNightVisionColor(vColor, gs_vNightVisionMainColor); } // Noise. vColor = ApplyNoise(vColor, vTexCoord); return vColor; } //--------------------------------------------------------------------------- float4 Infrared_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { float4 vColor = tex2D(g_samSrcColor, vTexCoord); float fLuminance = GetLuminance(vColor); float fMask = tex2D(g_samSrcAux, vTexCoord).b; if (any(fMask)) { // Infrared conversion based on luminance. vColor = tex1D(g_samIRRamp, fLuminance); } else { // Multiply luminance to darken and invert. vColor = fLuminance * (1 - fLuminance); } // Noise. vColor = ApplyNoise(vColor, vTexCoord); return vColor; } //--------------------------------------------------------------------------- float4 EdgeDetect_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { float4 vOrigNormPos = tex2D(g_samSrcNormPos, vTexCoord); float4 vSumNormPos = 0; for(int i = 0; i < gs_iEdgeDetectKernelSize; i++) { float4 vKernelNormPos = tex2D(g_samSrcNormPos, vTexCoord + g_vEdgeDetectTexelKernel[i]); vSumNormPos.xyz += 1 - dot(vOrigNormPos.xyz, vKernelNormPos.xyz); vSumNormPos.w += abs(vOrigNormPos.w - vKernelNormPos.w) / vOrigNormPos.w; } vSumNormPos.w = step(g_fEdgeDepthThreshold, vSumNormPos.w); vSumNormPos.xyz += vSumNormPos.w; float fMask = tex2D(g_samSrcAux, vTexCoord).b; if (any(fMask)) { vSumNormPos = 1 - vSumNormPos; } return vSumNormPos; } //--------------------------------------------------------------------------- float4 PassThrough_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { return tex2D(g_samSrcColor, vTexCoord); } //--------------------------------------------------------------------------- float4 HeatShimmer_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { float2 vNewTexCoord = vTexCoord; float4 vHeatBright = tex2D(g_samSrcAux, vTexCoord); float2 vHeat = vHeatBright.rg; if (any(vHeat - 0.5)) { vHeat = vHeat * 2 - 1; float2 vOffsetTexCoord = vTexCoord + vHeat.xy * g_fPerturbationMultiplier; if (any(tex2D(g_samSrcAux, vOffsetTexCoord).rg - 0.5)) { vNewTexCoord = vOffsetTexCoord; } } return tex2D(g_samSrcColor, vNewTexCoord) * (1 + g_fShimmerBrightness * vHeatBright.b); } float4 DepthOfFieldX_PS_Old_Motion(float2 vTexCoord : TEXCOORD0) : COLOR0 { float depth = GetZDepth(vTexCoord); float4 color = float4(tex2D(g_samSrcColor, vTexCoord).xyz, 1.0F); float4 blur_color = float4(tex2D(ShaderMap4Sampler, vTexCoord).xyz, 1.0F); float blur_alpha = 1-tex2D(ShaderMap5Sampler, vTexCoord).w; color = lerp(color,blur_color,saturate(blur_alpha*g_BlurAccAmount)); return ApplyDepthOfFieldX(color, vTexCoord, depth); } float4 DepthOfFieldX_PS_Motion(float2 vTexCoord : TEXCOORD0) : COLOR0 { float depth = GetZDepth(vTexCoord); float4 color = float4(tex2D(g_samSrcColor, vTexCoord).xyz, 1.0F); color = ApplyMotionBlur(color, vTexCoord, depth); return ApplyDepthOfFieldX(color, vTexCoord, depth); } //--------------------------------------------------------------------------- float4 DepthOfFieldX_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { float depth = GetZDepth(vTexCoord); float4 color = float4(tex2D(g_samSrcColor, vTexCoord).xyz, 1.0F); float4 return_color = ApplyDepthOfFieldX(color, vTexCoord, depth); return float4(return_color.rgb, 1.0f); } //--------------------------------------------------------------------------- float4 DepthOfFieldY_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { float depth = GetZDepth(vTexCoord); float4 color = float4(tex2D(g_samSrcColor, vTexCoord).xyz, 1.0F); float4 return_color = ApplyDepthOfFieldY(color, vTexCoord, depth); return float4(return_color.rgb, 1.0f); } //--------------------------------------------------------------------------- float4 GaussBlurX_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { return BlurColorX(vTexCoord); } //--------------------------------------------------------------------------- float4 GaussBlurY_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { return BlurColorY(vTexCoord); } //--------------------------------------------------------------------------- float4 Magnify_PS(float2 vTexCoord : TEXCOORD0) : COLOR0 { float2 vOffset = vTexCoord * 2 - 1; vOffset.y *= 0.75; float fDot = dot(vOffset, vOffset) * 7; if (fDot > 0.5) { fDot = 0.0f; } vOffset *= fDot; float3 vMask = tex2D(g_samSrcAux, vTexCoord).rgb; if (any(vMask.b)) { vTexCoord += vOffset; } vMask.rg = vMask.rg * 2 - 1; vTexCoord += vMask.rg * g_fPerturbationMultiplier; return tex2D(g_samSrcColor, vTexCoord); } //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Techniques //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- void SSAO_VS(float4 in_position : POSITION, float2 in_uv : TEXCOORD0, out float4 out_position : POSITION, out float2 out_uv : TEXCOORD0, out float3 out_eye : TEXCOORD1 ) { out_position = mul(in_position, matModelToProj); float3 temp = in_position*2.0-1.0; temp.z = -1.0; out_eye = (float3(temp.x, temp.y, -temp.z)); out_uv = in_uv; } float4 SSAO_PS(float2 in_uv : TEXCOORD0, //TEST float3 in_eye : TEXCOORD1 //,out float4 out_mrt : COLOR1 ) : COLOR0 { //out_mrt = tex2D(Shader1Sampler, in_uv); //TEST=============================================================== //float ez = tex2D(Shader2Sampler, in_uv); float depth = GetZDepth(in_uv); float3 ep = depth*in_eye.xyz/in_eye.z; float bl = 0.0; for (int i=0; i<32; i++) { float3 se = ep + rad*fk3f[i].xyz; float2 ss = (se.xy/se.z)*float2(1.0, 1.0); float2 sn = ss.xy*0.5 + float2(0.5, 0.5); float sz = GetZDepth(sn); float zd = 50*max(se.z-sz, 0.0); bl += (1.0/(1.0+zd*zd)); } bl /= 32.0; pow(bl, 4); bl += 0.4; pow(bl, 4); saturate(bl); //return float4(bl, bl, bl, 1.0);// * tex2D(Shader0Sampler, in_uv); //===============================================================TEST //out_mrt = tex2D(Shader1Sampler, in_uv); //float depth0 = tex2D(g_samSrcNormPos, in_uv).a; float offset = min(1024,depth+1); offset = 1.f/(offset); float depth1 = tex2D(g_samSrcNormPos, in_uv + float2(-offset, -offset)).a; float depth2 = tex2D(g_samSrcNormPos, in_uv + float2(0, -offset)).a; float depth3 = tex2D(g_samSrcNormPos, in_uv + float2(offset, -offset)).a; float depth4 = tex2D(g_samSrcNormPos, in_uv + float2(-offset, 0)).a; float depth5 = tex2D(g_samSrcNormPos, in_uv + float2(offset, 0)).a; float depth6 = tex2D(g_samSrcNormPos, in_uv + float2(-offset, offset)).a; float depth7 = tex2D(g_samSrcNormPos, in_uv + float2(0, offset)).a; float depth8 = tex2D(g_samSrcNormPos, in_uv + float2(offset, offset)).a; float3 norm0 = (normalize(tex2D(g_samSrcNormPos, in_uv).rgb)); float3 norm1 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(-offset, -offset)).rgb)); float3 norm2 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(0, -offset)).rgb)); float3 norm3 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(offset, -offset)).rgb)); float3 norm4 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(-offset, 0)).rgb)); float3 norm5 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(offset, 0)).rgb)); float3 norm6 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(-offset, offset)).rgb)); float3 norm7 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(0, offset)).rgb)); float3 norm8 = (normalize(tex2D(g_samSrcNormPos, in_uv + float2(offset, offset)).rgb)); // Sample point layout // 6 7 8 // // 4 0 5 // // 1 2 3 //Calc for normal maps====================================== float3 l_1a = cross(norm0,norm1); float3 l_1b= cross(norm8,norm0); float3 l_2a = cross(norm0,norm4); float3 l_2b = cross(norm5,norm0); float3 l_3a = cross(norm0,norm3); float3 l_3b = cross(norm6,norm0); float3 l_4a = cross(norm0,norm7); float3 l_4b = cross(norm2,norm0); float t1 = dot(l_1a,l_1b); float t2 = dot(l_2a,l_2b); float t3 = dot(l_3a,l_3b); float t4 = dot(l_4a,l_4b); float t = saturate(-t1) + saturate(-t2) + saturate(-t3) + saturate(-t4); t /= 4; //float t = saturate(-t1) + saturate(-t2);// + saturate(-t3) + saturate(-t4); //t /= 2; float factor = t; factor = 1 - factor; //factor = pow(factor,2); factor *= bl; //======================================================== //factor = saturate(pow (factor+0.5, 2)); //return float4(0.1 + factor,0.1,0.1,1) * tex2D(Shader0Sampler, in_uv); //return float4(factor,factor,factor,1); return float4(factor,factor,factor,1) * tex2D(g_samSrcColor, in_uv); //return tex2D(g_samSrcNormPos, in_uv); } //--------------------------------------------------------------------------- // Techniques //--------------------------------------------------------------------------- technique MRT_SSAO { pass P0 { VertexShader = compile vs_3_0 SSAO_VS(); PixelShader = compile ps_3_0 SSAO_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_NightVision { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 NightVision_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_Infrared { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 Infrared_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_EdgeDetect { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 EdgeDetect_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_PassThrough { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 PassThrough_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_HeatShimmer { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 HeatShimmer_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_DepthOfFieldX_Old_Motion { pass p0 { VertexShader = compile vs_3_0 VSMain(); PixelShader = compile ps_3_0 DepthOfFieldX_PS_Old_Motion(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_DepthOfFieldX_Motion { pass p0 { VertexShader = compile vs_3_0 VSMain(); PixelShader = compile ps_3_0 DepthOfFieldX_PS_Motion(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_DepthOfFieldX { pass p0 { VertexShader = compile vs_3_0 VSMain(); PixelShader = compile ps_3_0 DepthOfFieldX_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_DepthOfFieldY { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 DepthOfFieldY_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_GaussBlurX { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 GaussBlurX_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_GaussBlurY { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 GaussBlurY_PS(); ZEnable = false; AlphaBlendEnable = false; } } //--------------------------------------------------------------------------- technique MRT_Magnify { pass p0 { VertexShader = compile vs_2_0 VSMain(); PixelShader = compile ps_2_0 Magnify_PS(); ZEnable = false; AlphaBlendEnable = false; } } //---------------------------------------------------------------------------