Dof Apply Default
(dof_apply:default
, 0x397081f188edcd2b
)
This template is referenced 1 time by dof_apply.
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,
};
Sampler 2
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 1,
D3DSAMP_MINFILTER = 1,
D3DSAMP_MIPFILTER = 1,
};
Sampler 3
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 2,
D3DSAMP_MINFILTER = 2,
D3DSAMP_MIPFILTER = 2,
};
Sampler 4
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 2,
D3DSAMP_MINFILTER = 2,
D3DSAMP_MIPFILTER = 2,
};
Shaders
Vertex Shader
float ref_far_focus_distance_min : register(vs_3_0, c6);
float ref_near_focus_distance_max : register(vs_3_0, c4);
float ref_near_focus_distance_min : register(vs_3_0, c5);
column_major float4x4 view_proj_matrix : register(vs_3_0, c0);
struct VertexMain_Input
{
float4 position : POSITION;
float4 texcoord : TEXCOORD;
};
struct VertexMain_Output
{
float4 position : POSITION;
float2 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float4 texcoord2 : TEXCOORD2;
};
VertexMain_Output VertexMain(VertexMain_Input i)
{
VertexMain_Output o;
float2 temp0, temp1;
// def c7, 1, -1, 0, 0
// dcl_position v0
// dcl_texcoord v1
// dcl_position o0
// dcl_texcoord o1.xy
// dcl_texcoord1 o2
// dcl_texcoord2 o3
// dp4 o0.x, v0, c0
o.position.x = dot(i.position, (view_proj_matrix._m00_m10_m20_m30));
// dp4 o0.y, v0, c1
o.position.y = dot(i.position, (view_proj_matrix._m01_m11_m21_m31));
// dp4 o0.w, v0, c3
o.position.w = dot(i.position, (view_proj_matrix._m03_m13_m23_m33));
// rcp r0.x, c4.x
temp0.x = 1.0f / ref_near_focus_distance_max.x;
// mov o2.x, -r0.x
o.texcoord1.x = -temp0.x;
// rcp r0.x, c5.x
temp0.x = 1.0f / ref_near_focus_distance_min.x;
// mov o2.y, -r0.x
o.texcoord1.y = -temp0.x;
// mov r1.xy, c7
temp1.xy = float2(1, -1);
// add r0.y, r1.x, -c6.x
temp0.y = temp1.x + -ref_far_focus_distance_min.x;
// mul o3.y, r0.x, r0.y
o.texcoord2.y = temp0.x * temp0.y;
// add r0.x, r1.y, c6.x
temp0.x = temp1.y + ref_far_focus_distance_min.x;
// rcp r0.y, c6.x
temp0.y = 1.0f / ref_far_focus_distance_min.x;
// mul o3.w, r0.y, r0.x
o.texcoord2.w = temp0.y * temp0.x;
// mul r0.xy, r0.y, c7.yxzw
temp0.xy = temp0.yy * float2(-1, 1);
// mov o0.z, c7.x
o.position.z = float1(1);
// mov o1.xy, v1
o.texcoord = i.texcoord;
// mov o2.zw, r0.xyxy
o.texcoord1.zw = temp0.xy;
// mad o3.xz, r0.y, c7.zyxw, c7
o.texcoord2.xz = temp0.yy * float2(0, 1) + float2(1, 0);
//
return o;
}
Decompiled by DXDecompiler.
Pixel Shader
sampler2D depth : register(ps_3_0, s2);
sampler2D diffuse_texture : register(ps_3_0, s0);
sampler2D filter_color_texture : register(ps_3_0, s3);
sampler2D opacity_texture : register(ps_3_0, s1);
float ref_clamp : register(ps_3_0, c1);
float ref_far_focus_distance_max : register(ps_3_0, c3);
float ref_far_focus_distance_min : register(ps_3_0, c2);
float3 render_target_size : register(ps_3_0, c0);
float2 render_target_texel_offset : register(ps_3_0, c4);
sampler2D self_illumination_texture : register(ps_3_0, s4);
float4 PixelMain(float2 texcoord : TEXCOORD) : COLOR
{
float4 out_color;
float4 temp0, temp1, temp2, temp3;
float2 temp4;
float3 temp5;
// def c5, 3, 0, 1, 0.9411765
// def c6, 1, 1.0769231, 3.3333333, -2.3333333
// def c7, -20, -1.5384616, -3.3333333, 3.3333333
// def c8, 0.5, -1.5, -0.5, 0.23529412
// dcl_texcoord v0.xy
// dcl_2d s0
// dcl_2d s1
// dcl_2d s2
// dcl_2d s3
// dcl_2d s4
// rcp r0.x, c0.x
temp0.x = 1.0f / render_target_size.x;
// rcp r0.y, c0.y
temp0.y = 1.0f / render_target_size.y;
// mad r1, r0.xyxy, c8.xyyz, v0.xyxy
temp1 = temp0.xyxy * float4(0.5, -1.5, -1.5, -0.5) + texcoord.xyxy;
// mad r0, r0.xyxy, -c8.xyyz, v0.xyxy
temp0 = temp0.xyxy * float4(-0.5, 1.5, 1.5, 0.5) + texcoord.xyxy;
// texld r2, r1.zwzw, s0
temp2 = tex2D(diffuse_texture, temp1.zw);
// texld r1, r1, s0
temp1 = tex2D(diffuse_texture, temp1.xy);
// mul r2.xyz, r2, c8.w
temp2.xyz = temp2.xyz * float3(0.23529412, 0.23529412, 0.23529412);
// mad_pp r1.xyz, r1, c8.w, r2
temp1.xyz = /* not implemented _pp modifier */ temp1.xyz * float3(0.23529412, 0.23529412, 0.23529412) + temp2.xyz;
// texld r2, r0, s0
temp2 = tex2D(diffuse_texture, temp0.xy);
// texld r0, r0.zwzw, s0
temp0 = tex2D(diffuse_texture, temp0.zw);
// mad_pp r1.xyz, r2, c8.w, r1
temp1.xyz = /* not implemented _pp modifier */ temp2.xyz * float3(0.23529412, 0.23529412, 0.23529412) + temp1.xyz;
// mad_pp r0.xyz, r0, c8.w, r1
temp0.xyz = /* not implemented _pp modifier */ temp0.xyz * float3(0.23529412, 0.23529412, 0.23529412) + temp1.xyz;
// rcp r0.w, c3.x
temp0.w = 1.0f / ref_far_focus_distance_max.x;
// mul r1.x, r0.w, -c2.x
temp1.x = temp0.w * -ref_far_focus_distance_min.x;
// texld r2, v0, s2
temp2 = tex2D(depth, texcoord.xy);
// mad_sat_pp r0.w, r0.w, r2.x, r1.x
;// error
// mul_pp r0.w, r0.w, c8.x
temp0.w = /* not implemented _pp modifier */ temp0.w * float1(0.5);
// mov r1.x, c5.x
temp1.x = float1(3);
// mad r1.xy, c4, r1.x, v0
temp1.xy = render_target_texel_offset.xy * temp1.xx + texcoord.xy;
// texld_pp r3, r1, s4
temp3 = /* not implemented _pp modifier */ tex2D(self_illumination_texture, temp1.xy);
// texld_pp r1, r1, s3
temp1 = /* not implemented _pp modifier */ tex2D(filter_color_texture, temp1.xy);
// max_pp r1.w, r3.w, r0.w
temp1.w = /* not implemented _pp modifier */ max(temp3.w, temp0.w);
// cmp_pp r0.w, -r2_abs.x, r3.w, r1.w
temp0.w = /* not implemented _pp modifier */ (-abs(temp2).x >= 0) ? temp3.w : temp1.w;
// max_pp r1.w, r0.w, c5.y
temp1.w = /* not implemented _pp modifier */ max(temp0.w, float1(0));
// min_pp r0.w, c1.x, r1.w
temp0.w = /* not implemented _pp modifier */ min(ref_clamp.x, temp1.w);
// mov r2, c7
temp2 = float4(-20, -1.5384616, -3.3333333, 3.3333333);
// mad_sat_pp r2, r0.w, r2, c6
;// error
// add_pp r4.xy, -r2, c5.z
temp4.xy = /* not implemented _pp modifier */ -temp2.xy + float2(1, 1);
// min_pp r5.xy, r4, r2.yzzw
temp5.xy = /* not implemented _pp modifier */ min(temp4.xy, temp2.yz);
// mul_pp r2.xyz, r3, r5.y
temp2.xyz = /* not implemented _pp modifier */ temp3.xyz * temp5.yyy;
// mad_pp r0.xyz, r5.x, r0, r2
temp0.xyz = /* not implemented _pp modifier */ temp5.xxx * temp0.xyz + temp2.xyz;
// mad_pp r0.xyz, r2.w, r1, r0
temp0.xyz = /* not implemented _pp modifier */ temp2.www * temp1.xyz + temp0.xyz;
// mov_pp r5.z, r2.w
temp5.z = /* not implemented _pp modifier */ temp2.w;
// dp3_pp r0.w, r5.yzxw, c5.zzww
temp0.w = /* not implemented _pp modifier */ dot(temp5.yzx, float3(1, 1, 0.9411765));
// add_pp r0.w, -r0.w, c5.z
temp0.w = /* not implemented _pp modifier */ -temp0.w + float1(1);
// texld r1, v0, s1
temp1 = tex2D(opacity_texture, texcoord.xy);
// mad oC0.xyz, r1, r0.w, r0
out_color.xyz = temp1.xyz * temp0.www + temp0.xyz;
// mov oC0.w, c5.z
out_color.w = float1(1);
//
return out_color;
}
Decompiled by DXDecompiler.