Skip to main content

Dof Initial Downsample Default

(dof_initial_downsample:default, 0x5616ceee9c9a39fa)

This template is referenced 1 time by dof_initial_downsample.

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

float3 render_target_size : register(vs_3_0, c4);
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;
float2 texcoord1 : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
float2 texcoord3 : TEXCOORD3;
float2 texcoord4 : TEXCOORD4;
float2 texcoord5 : TEXCOORD5;
};

VertexMain_Output VertexMain(VertexMain_Input i)
{
VertexMain_Output o;
float2 temp0;
// def c5, 0.125, -0.375, 0.375, 1
// def c6, -0.25, 0.25, -0.375, -0.125
// dcl_position v0
// dcl_texcoord v1
// dcl_position o0
// dcl_texcoord o1.xy
// dcl_texcoord1 o2.xy
// dcl_texcoord2 o3.xy
// dcl_texcoord3 o4.xy
// dcl_texcoord4 o5.xy
// dcl_texcoord5 o6.xy
// 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 / render_target_size.x;
// rcp r0.y, c4.y
temp0.y = 1.0f / render_target_size.y;
// mad o1.xy, r0, c6.x, v1
o.texcoord = temp0 * float4(-0.25, -0.25, -0.25, -0.25) + i.texcoord;
// mad o2.xy, r0, c6.yxzw, v1
o.texcoord1 = temp0 * float4(0.25, -0.25, -0.375, -0.125) + i.texcoord;
// mad o3.xy, r0, c6.z, v1
o.texcoord2 = temp0 * float4(-0.375, -0.375, -0.375, -0.375) + i.texcoord;
// mad o4.xy, r0, c6.wzzw, v1
o.texcoord3 = temp0 * float4(-0.125, -0.375, -0.375, -0.125) + i.texcoord;
// mad o5.xy, r0, c5, v1
o.texcoord4 = temp0 * float4(0.125, -0.375, 0.375, 1) + i.texcoord;
// mad o6.xy, r0, c5.zyzw, v1
o.texcoord5 = temp0 * float4(0.375, -0.375, 0.375, 1) + i.texcoord;
// mov o0.z, c5.w
o.position.z = float1(1);
//

return o;
}

Decompiled by DXDecompiler.

Pixel Shader

sampler2D depth : register(ps_3_0, s1);
sampler2D diffuse_texture : register(ps_3_0, s0);
float ref_near_focus_distance_max : register(ps_3_0, c1);
float ref_near_focus_distance_min : register(ps_3_0, c2);
float3 render_target_size : register(ps_3_0, c0);
struct PixelMain_Input
{
float2 texcoord : TEXCOORD;
float2 texcoord1 : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
float2 texcoord3 : TEXCOORD3;
float2 texcoord4 : TEXCOORD4;
float2 texcoord5 : TEXCOORD5;
};

float4 PixelMain(PixelMain_Input i) : COLOR
{
float4 out_color;
float4 temp0, temp1, temp2, temp3, temp4, temp5, temp6;
// def c3, 0.25, 0, 0.5, 0.75
// def c4, 2, 3, 0, 0.5
// dcl_texcoord v0.xy
// dcl_texcoord1 v1.xy
// dcl_texcoord2 v2.xy
// dcl_texcoord3 v3.xy
// dcl_texcoord4 v4.xy
// dcl_texcoord5 v5.xy
// dcl_2d s0
// dcl_2d s1
// texld_pp r0, v0, s0
temp0 = /* not implemented _pp modifier */ tex2D(diffuse_texture, i.texcoord.xy);
// texld r1, v1, s0
temp1 = tex2D(diffuse_texture, i.texcoord1.xy);
// add_pp r0.xyz, r0, r1
temp0.xyz = /* not implemented _pp modifier */ temp0.xyz + temp1.xyz;
// rcp r1.x, c0.y
temp1.x = 1.0f / render_target_size.y;
// mov r1.yz, c4.xxyw
temp1.yz = float2(2, 3);
// mad r2.xy, r1.yxzw, c4.zwzw, v0
temp2.xy = temp1.yx * float2(0, 0.5) + i.texcoord.xy;
// texld r2, r2, s0
temp2 = tex2D(diffuse_texture, temp2.xy);
// add_pp r0.xyz, r0, r2
temp0.xyz = /* not implemented _pp modifier */ temp0.xyz + temp2.xyz;
// mad r2.xy, r1.yxzw, c4.zwzw, v1
temp2.xy = temp1.yx * float2(0, 0.5) + i.texcoord1.xy;
// texld r2, r2, s0
temp2 = tex2D(diffuse_texture, temp2.xy);
// add_pp r0.xyz, r0, r2
temp0.xyz = /* not implemented _pp modifier */ temp0.xyz + temp2.xyz;
// mul_pp oC0.xyz, r0, c3.x
out_color.xyz = /* not implemented _pp modifier */ temp0.xyz * float3(0.25, 0.25, 0.25);
// mad r0.xy, c3.ywzw, r1.zxzw, v2
temp0.xy = float2(0, 0.75) * temp1.zx + i.texcoord2.xy;
// texld r0, r0, s1
temp0 = tex2D(depth, temp0.xy);
// mad r2.xy, c3.ywzw, r1.zxzw, v3
temp2.xy = float2(0, 0.75) * temp1.zx + i.texcoord3.xy;
// texld r2, r2, s1
temp2 = tex2D(depth, temp2.xy);
// mov r0.y, r2.x
temp0.y = temp2.x;
// mad r2.xy, c3.ywzw, r1.zxzw, v4
temp2.xy = float2(0, 0.75) * temp1.zx + i.texcoord4.xy;
// texld r2, r2, s1
temp2 = tex2D(depth, temp2.xy);
// mov r0.z, r2.x
temp0.z = temp2.x;
// mad r1.zw, c3.xyyw, r1.xyzx, v5.xyxy
temp1.zw = float2(0, 0.75) * temp1.zx + i.texcoord5.xy;
// mul r2.yzw, r1.xxyx, c3.xxyz
temp2.yzw = temp1.xyx * float3(0.25, 0, 0.5);
// texld r1, r1.zwzw, s1
temp1 = tex2D(depth, temp1.zw);
// mov r0.w, r1.x
temp0.w = temp1.x;
// rcp r1.x, c2.x
temp1.x = 1.0f / ref_near_focus_distance_min.x;
// mul r1.y, r1.x, c1.x
temp1.y = temp1.x * ref_near_focus_distance_max.x;
// mad_sat_pp r0, -r1.x, r0, r1.y
;// error
// mov r2.x, c4.z
temp2.x = float1(0);
// add r3, r2, v2.xyxy
temp3 = temp2 + i.texcoord2.xyxy;
// texld r4, r3, s1
temp4 = tex2D(depth, temp3.xy);
// texld r3, r3.zwzw, s1
temp3 = tex2D(depth, temp3.zw);
// add r5, r2, v3.xyxy
temp5 = temp2 + i.texcoord3.xyxy;
// texld r6, r5, s1
temp6 = tex2D(depth, temp5.xy);
// texld r5, r5.zwzw, s1
temp5 = tex2D(depth, temp5.zw);
// mov r3.y, r5.x
temp3.y = temp5.x;
// mov r4.y, r6.x
temp4.y = temp6.x;
// add r5, r2, v4.xyxy
temp5 = temp2 + i.texcoord4.xyxy;
// add r2, r2, v5.xyxy
temp2 = temp2 + i.texcoord5.xyxy;
// texld r6, r5, s1
temp6 = tex2D(depth, temp5.xy);
// texld r5, r5.zwzw, s1
temp5 = tex2D(depth, temp5.zw);
// mov r3.z, r5.x
temp3.z = temp5.x;
// mov r4.z, r6.x
temp4.z = temp6.x;
// texld r5, r2, s1
temp5 = tex2D(depth, temp2.xy);
// texld r2, r2.zwzw, s1
temp2 = tex2D(depth, temp2.zw);
// mov r3.w, r2.x
temp3.w = temp2.x;
// mad_sat_pp r2, -r1.x, r3, r1.y
;// error
// mov r4.w, r5.x
temp4.w = temp5.x;
// mad_sat_pp r3, -r1.x, r4, r1.y
;// error
// texld r4, v2, s1
temp4 = tex2D(depth, i.texcoord2.xy);
// texld r5, v3, s1
temp5 = tex2D(depth, i.texcoord3.xy);
// mov r4.y, r5.x
temp4.y = temp5.x;
// texld r5, v4, s1
temp5 = tex2D(depth, i.texcoord4.xy);
// mov r4.z, r5.x
temp4.z = temp5.x;
// texld r5, v5, s1
temp5 = tex2D(depth, i.texcoord5.xy);
// mov r4.w, r5.x
temp4.w = temp5.x;
// mad_sat_pp r1, -r1.x, r4, r1.y
;// error
// max_pp r4, r3, r1
temp4 = /* not implemented _pp modifier */ max(temp3, temp1);
// max_pp r1, r2, r4
temp1 = /* not implemented _pp modifier */ max(temp2, temp4);
// max_pp r2, r0, r1
temp2 = /* not implemented _pp modifier */ max(temp0, temp1);
// max_pp r0.xy, r2.xzzw, r2.ywzw
temp0.xy = /* not implemented _pp modifier */ max(temp2.xz, temp2.yw);
// max_pp oC0.w, r0.x, r0.y
out_color.w = /* not implemented _pp modifier */ max(temp0.x, temp0.y);
//

return out_color;
}

Decompiled by DXDecompiler.