Grayscale Default
(grayscale:default
, 0x9c2612638c2929ad
)
This template is referenced 1 time by grayscale.
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,
};
Shaders
Vertex Shader
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, c5);
float3 vp_size : register(vs_3_0, c6);
struct VertexMain_Output
{
float4 position : POSITION;
float4 texcoord1 : TEXCOORD1;
};
VertexMain_Output VertexMain(float4 position : POSITION)
{
VertexMain_Output o;
float4 temp0, temp2;
float2 temp1;
// def c7, 2, 1, -1, 0.5
// dcl_position v0
// dcl_position o0
// dcl_texcoord1 o1
// mov r0, c7
temp0 = float4(2, 1, -1, 0.5);
// add r1.xy, r0.w, c4
temp1.xy = temp0.ww + render_target_texel_offset.xy;
// mul r0.yz, r0, c6.xxyw
temp0.yz = temp0.yz * vp_size.xy;
// mov r2.xy, c6
temp2.xy = vp_size.xy;
// mad r0.xw, c5.xyzy, r0.x, r2.xyzy
temp0.xw = vp_offset.xy * temp0.xx + temp2.xy;
// add r0.xw, r0, c7.z
temp0.xw = temp0.xw + float2(-1, -1);
// dp4 r2.w, v0, c3
temp2.w = dot(position, (view_proj_matrix._m03_m13_m23_m33));
// mul r0.xw, r0, r2.w
temp0.xw = temp0.xw * temp2.ww;
// dp4 r2.x, v0, c0
temp2.x = dot(position, (view_proj_matrix._m00_m10_m20_m30));
// dp4 r2.y, v0, c1
temp2.y = dot(position, (view_proj_matrix._m01_m11_m21_m31));
// mad r0.xy, r2, r0.yzzw, r0.xwzw
temp0.xy = temp2.xy * temp0.yz + temp0.xw;
// add r0.z, r2.w, r2.w
temp0.z = temp2.w + temp2.w;
// mad o1.xy, r0.z, r1, r0
o.texcoord1.xy = temp0.zz * temp1.xy + temp0.xy;
// dp4 r2.z, v0, c2
temp2.z = dot(position, (view_proj_matrix._m02_m12_m22_m32));
// mov o0, r2
o.position = temp2;
// mul o1.zw, r2, c7.xyyx
o.texcoord1.zw = temp2.zw * float2(1, 2);
//
return o;
}
Decompiled by DXDecompiler.
Pixel Shader
sampler2D back_buffer_copy : register(ps_3_0, s0);
float4 PixelMain(float4 texcoord1 : TEXCOORD1) : COLOR
{
float4 out_color;
float4 temp0;
// def c0, 0.27, 0.67, 0.06, 1
// dcl_texcoord1 v0.xyw
// dcl_2d s0
// rcp r0.x, v0.w
temp0.x = 1.0f / texcoord1.w;
// mul r0.xy, r0.x, v0
temp0.xy = temp0.xx * texcoord1.xy;
// texld r0, r0, s0
temp0 = tex2D(back_buffer_copy, temp0.xy);
// dp3 oC0.xyz, r0, c0
out_color.xyz = dot(temp0.xyz, float3(0.27, 0.67, 0.06));
// mov oC0.w, c0.w
out_color.w = float1(1);
//
return out_color;
}
Decompiled by DXDecompiler.