Depth Blur Default
(depth_blur:default
, 0xba9c096529781a95
)
This template is referenced 1 time by depth_blur.
Technique ambient
Render States
More info can be found on the Direct3D Docs
enum D3DRENDERSTATETYPE {
D3DRS_ZENABLE = 0,
D3DRS_ZFUNC = 4,
D3DRS_ZWRITEENABLE = 0,
D3DRS_ALPHABLENDENABLE = 0,
D3DRS_CULLMODE = 1,
D3DRS_COLORWRITEENABLE = 15,
D3DRS_COLORWRITEENABLE1 = 15,
D3DRS_COLORWRITEENABLE2 = 15,
D3DRS_STENCILENABLE = 0,
D3DRS_STENCILFUNC = 1,
D3DRS_STENCILFAIL = 1,
D3DRS_STENCILMASK = 0,
D3DRS_STENCILPASS = 1,
D3DRS_STENCILREF = 0,
D3DRS_STENCILWRITEMASK = 0,
D3DRS_STENCILZFAIL = 1,
D3DRS_DEPTHBIAS = 0,
D3DRS_SLOPESCALEDEPTHBIAS = 0,
D3DRS_FOGENABLE = 0,
D3DRS_SPECULARENABLE = 0,
D3DRS_ADAPTIVETESS_X = 0,
D3DRS_ADAPTIVETESS_Z = 0,
D3DRS_ADAPTIVETESS_W = 0,
D3DRS_SRGBWRITEENABLE = 0,
D3DRS_SEPARATEALPHABLENDENABLE = 0,
D3DRS_ALPHATESTENABLE = 0,
};
Sampler States
More info can be found on the Direct3D Docs
Sampler 0
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 2,
D3DSAMP_MINFILTER = 2,
D3DSAMP_MIPFILTER = 2,
};
Sampler 1
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 1,
D3DSAMP_MINFILTER = 1,
D3DSAMP_MIPFILTER = 1,
};
Shaders
Vertex Shader
float ref_far_focus_distance_max : register(vs_3_0, c10);
float ref_far_focus_distance_min : register(vs_3_0, c9);
float ref_near_focus_distance_max : register(vs_3_0, c7);
float ref_near_focus_distance_min : register(vs_3_0, c8);
float3 render_target_texel_offset : register(vs_3_0, c4);
column_major float4x4 view_proj_matrix : register(vs_3_0, c0);
float3 vp_offset : register(vs_3_0, c6);
float3 vp_size : register(vs_3_0, c5);
struct VertexMain_Input
{
float4 position : POSITION;
float4 texcoord : TEXCOORD;
};
struct VertexMain_Output
{
float4 position : POSITION;
float2 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float3 texcoord2 : TEXCOORD2;
float3 texcoord3 : TEXCOORD3;
};
VertexMain_Output VertexMain(VertexMain_Input i)
{
VertexMain_Output o;
float4 temp0, temp1;
float2 temp2;
// def c11, 2, -1, 0.5, 1
// dcl_position v0
// dcl_texcoord v1
// dcl_position o0
// dcl_texcoord o1.xy
// dcl_texcoord1 o2
// dcl_texcoord2 o3.xyz
// dcl_texcoord3 o4.xyz
// dp4 r0.x, v0, c0
temp0.x = dot(i.position, (view_proj_matrix._m00_m10_m20_m30));
// mov r1.xz, c11
temp1.xz = float2(2, 0.5);
// mov r2.xy, c5
temp2.xy = vp_size.xy;
// mad r1.xy, c6, r1.x, r2
temp1.xy = vp_offset.xy * temp1.xx + temp2.xy;
// add r1.xy, r1, c11.y
temp1.xy = temp1.xy + float2(-1, -1);
// dp4 r0.w, v0, c3
temp0.w = dot(i.position, (view_proj_matrix._m03_m13_m23_m33));
// mul r1.xy, r1, r0.w
temp1.xy = temp1.xy * temp0.ww;
// mad r1.x, r0.x, c5.x, r1.x
temp1.x = temp0.x * vp_size.x + temp1.x;
// add r1.zw, r1.z, c4.xyxy
temp1.zw = temp1.zz + render_target_texel_offset.xy;
// add r2.x, r0.w, r0.w
temp2.x = temp0.w + temp0.w;
// mad o2.x, r2.x, r1.z, r1.x
o.texcoord1.x = temp2.x * temp1.z + temp1.x;
// dp4 r0.y, v0, c1
temp0.y = dot(i.position, (view_proj_matrix._m01_m11_m21_m31));
// mad r1.x, r0.y, -c5.y, r1.y
temp1.x = temp0.y * -vp_size.y + temp1.y;
// mad o2.y, r2.x, r1.w, r1.x
o.texcoord1.y = temp2.x * temp1.w + temp1.x;
// mov r1.x, c8.x
temp1.x = ref_near_focus_distance_min.x;
// add r1.x, r1.x, -c7.x
temp1.x = temp1.x + -ref_near_focus_distance_max.x;
// rcp o3.z, r1.x
o.texcoord2.z = 1.0f / temp1.x;
// mov r1.x, c9.x
temp1.x = ref_far_focus_distance_min.x;
// add r1.x, r1.x, -c10.x
temp1.x = temp1.x + -ref_far_focus_distance_max.x;
// rcp o4.z, r1.x
o.texcoord3.z = 1.0f / temp1.x;
// mov r0.z, c11.w
temp0.z = float1(1);
// mov o0, r0
o.position = temp0;
// mul o2.zw, r0, c11.xywx
o.texcoord1.zw = temp0.zw * float2(1, 2);
// mov o1.xy, v1
o.texcoord = i.texcoord;
// mov o3.x, c8.x
o.texcoord2.x = ref_near_focus_distance_min.x;
// mov o3.y, c7.x
o.texcoord2.y = ref_near_focus_distance_max.x;
// mov o4.x, c9.x
o.texcoord3.x = ref_far_focus_distance_min.x;
// mov o4.y, c10.x
o.texcoord3.y = ref_far_focus_distance_max.x;
//
return o;
}
Decompiled by DXDecompiler.
Pixel Shader
float camera_far_range : register(ps_3_0, c1);
sampler2D depth : register(ps_3_0, s1);
float ref_clamp : register(ps_3_0, c0);
sampler2D ref_src_texture : register(ps_3_0, s0);
struct PixelMain_Input
{
float2 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float3 texcoord2 : TEXCOORD2;
float3 texcoord3 : TEXCOORD3;
};
float4 PixelMain(PixelMain_Input i) : COLOR
{
float4 out_color;
float4 temp0;
float2 temp1;
// def c2, -0.001, 1, 0, 0
// dcl_texcoord v0.xy
// dcl_texcoord1 v1
// dcl_texcoord2 v2.xyz
// dcl_texcoord3 v3.xyz
// dcl_2d s0
// dcl_2d s1
// texld r0, v1, s1
temp0 = tex2D(depth, i.texcoord1.xy);
// add r0.y, r0.x, c2.x
temp0.y = temp0.x + float1(-0.001);
// cmp r0.x, r0.y, r0.x, c1.x
temp0.x = (temp0.y >= 0) ? temp0.x : camera_far_range.x;
// add r0.y, r0.x, -v3.y
temp0.y = temp0.x + -i.texcoord3.y;
// mad r0.y, r0.y, -v3.z, c2.y
temp0.y = temp0.y * -i.texcoord3.z + float1(1);
// add r0.zw, -r0.x, v3.xyyx
temp0.zw = -temp0.xx + i.texcoord3.yx;
// add r1.xy, r0.x, -v2.yxzw
temp1.xy = temp0.xx + -i.texcoord2.yx;
// cmp r0.x, r0.w, c2.z, r0.y
temp0.x = (temp0.w >= 0) ? float1(0) : temp0.y;
// mad r0.y, r1.x, -v2.z, c2.y
temp0.y = temp1.x * -i.texcoord2.z + float1(1);
// cmp r0.x, r1.y, r0.x, r0.y
temp0.x = (temp1.y >= 0) ? temp0.x : temp0.y;
// cmp r0.x, r1.x, r0.x, c2.y
temp0.x = (temp1.x >= 0) ? temp0.x : float1(1);
// cmp r0.x, r0.z, r0.x, c2.y
temp0.x = (temp0.z >= 0) ? temp0.x : float1(1);
// max r1.x, r0.x, c2.z
temp1.x = max(temp0.x, float1(0));
// min oC0.w, c0.x, r1.x
out_color.w = min(ref_clamp.x, temp1.x);
// texld_pp r0, v0, s0
temp0 = /* not implemented _pp modifier */ tex2D(ref_src_texture, i.texcoord.xy);
// mov_pp oC0.xyz, r0
out_color.xyz = /* not implemented _pp modifier */ temp0.xyz;
//
return out_color;
}
Decompiled by DXDecompiler.