112Shaders/underwaterdeferred.fx
2021-12-28 10:06:46 +01:00

815 lines
24 KiB
HLSL

string DefaultParameterScopeBlock = "material"; // 1
float3 AmbientLightColor <bool unmanaged = 1;> = { 0.3, 0.3, 0.3 };
struct
{
float3 Color;
float3 Direction;
} DirectionalLight[3] : register(ps_3_0, c5) <bool unmanaged = 1;> = { 1.625198, 1.512711, 1.097048, 0.62914, -0.34874, 0.69465, 0.5232916, 0.6654605, 0.7815244, -0.32877, 0.90329, 0.27563, 0.4420466, 0.4102767, 0.4420466, -0.80704, -0.58635, 0.06975 };
struct {
float3 Color;
float3 Position;
float2 Range_Inner_Outer;
} PointLight[8] <bool unmanaged = 1;>;
struct {
float4 WorldPositionMultiplier_XYZZ;
float2 CurrentOffsetUV;
} Cloud <bool unmanaged = 1;>;
float3 NoCloudMultiplier <bool unmanaged = 1;> = { 1, 1, 1 };
float3 RecolorColorDummy <bool unmanaged = 1;>;
row_major float4x4 ShadowMapWorldToShadow <bool unmanaged = 1;>;
float OpacityOverride <bool unmanaged = 1;> = { 1 };
float3 TintColor <bool unmanaged = 1;> = { 1, 1, 1 };
float3 EyePosition <bool unmanaged = 1;>;
row_major float4x4 ViewProjection <bool unmanaged = 1;>;
float4 WorldBones[128] <bool unmanaged = 1;>;
texture DepthLutSampler <string UIWidget = "None"; string SasBindAddress = "Water.DepthLutTexture";>; // 2
sampler2D DepthLutSamplerSampler : register(ps_2_0, s0) : register(ps_3_0, s0) <string Texture = "DepthLutSampler"; string UIWidget = "None"; string SasBindAddress = "Water.DepthLutTexture";> =
sampler_state
{
Texture = <DepthLutSampler>; // 5
MinFilter = 2;
MagFilter = 2;
MipFilter = 2;
AddressU = 3;
AddressV = 3;
};
texture CausticSampler <string UIWidget = "None"; string SasBindAddress = "Water.CausticsTexture";>; // 9
sampler2D CausticSamplerSampler : register(ps_3_0, s1) <string Texture = "CausticSampler"; string UIWidget = "None"; string SasBindAddress = "Water.CausticsTexture";> =
sampler_state
{
Texture = <CausticSampler>; // 12
MinFilter = 2;
MagFilter = 2;
MipFilter = 2;
AddressU = 1;
AddressV = 1;
};
texture DepthTexture <string SasBindAddress = "WW3D.DepthTexture";>; // 16
sampler2D DepthTextureSampler : register(ps_2_0, s1) <string Texture = "DepthTexture"; string SasBindAddress = "WW3D.DepthTexture";> =
sampler_state
{
Texture = <DepthTexture>; // 18
MinFilter = 1;
MagFilter = 1;
MipFilter = 1;
AddressU = 3;
AddressV = 3;
};
column_major float4x4 ViewI : ViewInverse : register(ps_2_0, c11) : register(vs_2_0, c15) : register(ps_3_0, c11) : register(vs_3_0, c15);
column_major float4x4 ProjectionI : ProjectionInverse : register(vs_2_0, c11) : register(vs_3_0, c11);
float Time : Time;
// _Caustics_M_PixelShader1 Pixel_2_0 Has PRES False
float4 _Caustics_M_PixelShader1() : COLOR
{
float4 out_color;
float4 temp0;
// def c0, 0, 0, 0, 0
// mov r0, c0.x
temp0 = float4(0, 0, 0, 0);
// mov oC0, r0
out_color = temp0;
//
return out_color;
}
// _Caustics_M_VertexShader2 Vertex_2_0 Has PRES False
float4 _Caustics_M_VertexShader2() : POSITION
{
float4 out_position;
// def c0, 0, 1, 0, 0
// mov oPos, c0.xxxy
out_position = float4(0, 0, 0, 1);
//
return out_position;
}
// _Tint_M_PixelShader3 Pixel_2_0 Has PRES False
struct _Tint_M_PixelShader3_Input
{
float2 texcoord : TEXCOORD;
float3 texcoord1 : TEXCOORD1;
};
float4 _Tint_M_PixelShader3(_Tint_M_PixelShader3_Input i) : COLOR
{
float4 out_color;
float4 temp0, temp1;
// def c0, 200, 201, 0.005, 0
// dcl t0.xy
// dcl t1.xyz
// dcl_2d s0
// dcl_2d s1
// texld r0, t0, s1
temp0 = tex2D(DepthTextureSampler, i.texcoord.xy);
// mad r0.x, r0.x, t1.z, c13.w
temp0.x = temp0.x * i.texcoord1.z + (ViewI._m02_m12_m22_m32).w;
// add r1, -r0.x, c0.x
temp1 = -temp0.x + float4(200, 200, 200, 200);
// add r0.x, -r0.x, c0.y
temp0.x = -temp0.x + float1(201);
// mul r0.xy, r0.x, c0.z
temp0.xy = temp0.xx * float2(0.005, 0.005);
// texkill r1
clip(temp1);
// texld r0, r0, s0
temp0 = tex2D(DepthLutSamplerSampler, temp0.xy);
// mov oC0, r0
out_color = temp0;
//
return out_color;
}
// _Tint_M_VertexShader4 Vertex_2_0 Has PRES False
struct _Tint_M_VertexShader4_Input
{
float4 position : POSITION;
float4 texcoord : TEXCOORD;
};
struct _Tint_M_VertexShader4_Output
{
float3 texcoord1 : TEXCOORD1;
float4 position : POSITION;
float2 texcoord : TEXCOORD;
};
_Tint_M_VertexShader4_Output _Tint_M_VertexShader4(_Tint_M_VertexShader4_Input i)
{
_Tint_M_VertexShader4_Output o;
float4 temp0, temp1;
// def c0, 1, 0, 0, 0
// dcl_position v0
// dcl_texcoord v1
// mad r0, v0.xyxx, c0.xxyy, c0.yyxx
temp0 = i.position.xyxx * float4(1, 1, 0, 0) + float4(0, 0, 1, 1);
// dp4 r1.x, r0, c14
temp1.x = dot(temp0, (ProjectionI._m03_m13_m23_m33));
// rcp r1.x, r1.x
temp1.x = 1.0f / temp1.x;
// dp4 r1.y, r0, c11
temp1.y = dot(temp0, (ProjectionI._m00_m10_m20_m30));
// dp4 r1.z, r0, c12
temp1.z = dot(temp0, (ProjectionI._m01_m11_m21_m31));
// dp4 r1.w, r0, c13
temp1.w = dot(temp0, (ProjectionI._m02_m12_m22_m32));
// mul r0.xyz, r1.x, r1.yzww
temp0.xyz = temp1.xxx * temp1.yzw;
// rcp r0.w, r0.z
temp0.w = 1.0f / temp0.z;
// mul r0.xyz, r0, r0.w
temp0.xyz = temp0.xyz * temp0.www;
// dp3 oT1.x, r0, c15
o.texcoord1.x = dot(temp0.xyz, (ViewI._m00_m10_m20_m30).xyz);
// dp3 oT1.y, r0, c16
o.texcoord1.y = dot(temp0.xyz, (ViewI._m01_m11_m21_m31).xyz);
// dp3 oT1.z, r0, c17
o.texcoord1.z = dot(temp0.xyz, (ViewI._m02_m12_m22_m32).xyz);
// mov oPos.xyz, v0
o.position.xyz = i.position.xyz;
// mov oPos.w, c0.x
o.position.w = float1(1);
// mov oT0.xy, v1
o.texcoord = i.texcoord;
//
return o;
}
// Caustics_U_PixelShader5 Pixel_3_0 Has PRES True
struct Caustics_U_PixelShader5_Input
{
float2 texcoord : TEXCOORD;
float3 texcoord1 : TEXCOORD1;
};
float4 Caustics_U_PixelShader5(Caustics_U_PixelShader5_Input i) : COLOR
{
/*
PRSI
OutputRegisterOffset: 14
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 1
Unknown3: 0
Unknown4: 0
Unknown5: 14
Unknown6: 1
Mappings: 1
0 - ConstOutput: 0 ConstInput 0
*/
float4 expr14;
{
// Expression_2_1
// mul c14.x, c0.x, (0.12)
expr14.x = Time.x * (0.12);
}
float4 out_color;
float4 temp0, temp1, temp2, temp3, temp4;
// def c0, 200, 0.004, 0.4067543, 0.9135376
// def c1, -1, 0.3, 0.27, 0.33
// def c2, 201, 0.005, 0.75, 5
// def c3, -0.9135376, 0.4067543, 0, 0.9135376
// def c4, 2.2, 0, 0, 0
// dcl_texcoord v0.xy
// dcl_texcoord1 v1.xyz
// dcl_2d s0
// dcl_2d s1
// dcl_2d s2
// texld r0, v0, s2
temp0 = tex2D(DepthTextureSampler, i.texcoord.xy);
// mov r0.w, c11.w
temp0.w = (ViewI._m00_m10_m20_m30).w;
// mov r0.y, c12.w
temp0.y = (ViewI._m01_m11_m21_m31).w;
// mov r0.z, c13.w
temp0.z = (ViewI._m02_m12_m22_m32).w;
// mad r0.xyz, r0.x, v1.yzxw, r0.yzww
temp0.xyz = temp0.xxx * i.texcoord1.yzx + temp0.yzw;
// add r1, -r0.y, c0.x
temp1 = -temp0.y + float4(200, 200, 200, 200);
// texkill r1
clip(temp1);
// rcp r0.w, c6.z
temp0.w = 1.0f / DirectionalLight[0].Direction.z;
// mul r1.xy, r0.y, c6
temp1.xy = temp0.yy * DirectionalLight[0].Direction.xy;
// mad r1.xy, r1, -r0.w, r0.zxzw
temp1.xy = temp1.xy * -temp0.ww + temp0.zx;
// mul r1.xy, r1, c0.y
temp1.xy = temp1.xy * float2(0.004, 0.004);
// dp2add r1.w, r1, c3, c3.z
temp1.w = dot(temp1.xy, float2(-0.9135376, 0.40675429)) + float1(0);
// mov r2.zw, c0
temp2.zw = float2(0.40675429, 0.9135376);
// dp2add r1.z, r1, r2.zwzw, c14.x
temp1.z = dot(temp1.xy, temp2.zw) + expr14.x;
// dp2add r2.y, r1, c3.wyzw, c3.z
temp2.y = dot(temp1.xy, float2(0.9135376, 0.40675429)) + float1(0);
// mov r3.xy, c3
temp3.xy = float2(-0.9135376, 0.40675429);
// dp2add r2.x, r1, r3.yxzw, c14.x
temp2.x = dot(temp1.xy, temp3.yx) + expr14.x;
// texld r3, r2, s1
temp3 = tex2D(CausticSamplerSampler, temp2.xy);
// texld r4, r1.zwzw, s1
temp4 = tex2D(CausticSamplerSampler, temp1.zw);
// add r1.xy, r3, r4
temp1.xy = temp3.xy + temp4.xy;
// add r1.xy, r1, c1.x
temp1.xy = temp1.xy + float2(-1, -1);
// mad r2.zw, r1.xyxy, c1.y, r1
temp2.zw = temp1.xy * float2(0.3, 0.3) + temp1.zw;
// texld r3, r2.zwzw, s1
temp3 = tex2D(CausticSamplerSampler, temp2.zw);
// mad r2.zw, r1.xyxy, -c1.y, -r2.xyxy
temp2.zw = temp1.xy * float2(-0.3, -0.3) + -temp2.xy;
// texld r4, r2.zwzw, s1
temp4 = tex2D(CausticSamplerSampler, temp2.zw);
// mul r3.y, r3.w, r4.w
temp3.y = temp3.w * temp4.w;
// mad r2.zw, r1.xyxy, c1.z, r1
temp2.zw = temp1.xy * float2(0.27, 0.27) + temp1.zw;
// mad r1.zw, r1.xyxy, c1.w, r1
temp1.zw = temp1.xy * float2(0.33, 0.33) + temp1.zw;
// texld r4, r2.zwzw, s1
temp4 = tex2D(CausticSamplerSampler, temp2.zw);
// mad r2.zw, r1.xyxy, -c1.z, -r2.xyxy
temp2.zw = temp1.xy * float2(-0.27, -0.27) + -temp2.xy;
// mad r1.xy, r1, -c1.w, -r2
temp1.xy = temp1.xy * float2(-0.33, -0.33) + -temp2.xy;
// texld r2, r2.zwzw, s1
temp2 = tex2D(CausticSamplerSampler, temp2.zw);
// mul r3.x, r4.w, r2.w
temp3.x = temp4.w * temp2.w;
// texld r2, r1.zwzw, s1
temp2 = tex2D(CausticSamplerSampler, temp1.zw);
// texld r1, r1, s1
temp1 = tex2D(CausticSamplerSampler, temp1.xy);
// mul r3.z, r2.w, r1.w
temp3.z = temp2.w * temp1.w;
// mul r1.xyz, r3, r3
temp1.xyz = temp3.xyz * temp3.xyz;
// add r0.w, -r0.y, c2.x
temp0.w = -temp0.y + float1(201);
// mul r2.xy, r0.w, c2.y
temp2.xy = temp0.ww * float2(0.005, 0.005);
// mov r2.zw, c3.z
temp2.zw = float2(0, 0);
// texldl r2, r2, s0
temp2 = tex2Dlod(DepthLutSamplerSampler, temp2);
// mul r1.xyz, r1, r2.w
temp1.xyz = temp1.xyz * temp2.www;
// mov r2.x, c1.x
temp2.x = float1(-1);
// mov r2.z, c2.z
temp2.z = float1(0.75);
// lrp r3.xyz, r2.z, -r2.x, c5
temp3.xyz = lerp(DirectionalLight[0].Color.xyz, -temp2.xxx, temp2.zzz);
// mul r1.xyz, r1, r3
temp1.xyz = temp1.xyz * temp3.xyz;
// dsy r2.xyz, r0.yzxw
temp2.xyz = ddy(temp0.yzx);
// dsx r0.xyz, r0
temp0.xyz = ddx(temp0.xyz);
// mul r3.xyz, r2, r0
temp3.xyz = temp2.xyz * temp0.xyz;
// mad r0.xyz, r2.zxyw, r0.yzxw, -r3
temp0.xyz = temp2.zxy * temp0.yzx + -temp3.xyz;
// nrm r2.xyz, r0
temp2.xyz = normalize(temp0.xyz).xyz;
// dp3 r0.x, r2, c6
temp0.x = dot(temp2.xyz, DirectionalLight[0].Direction.xyz);
// max r1.w, r0.x, c3.z
temp1.w = max(temp0.x, float1(0));
// mul r0.xyz, r1, r1.w
temp0.xyz = temp1.xyz * temp1.www;
// mul r0.xyz, r0, c2.w
temp0.xyz = temp0.xyz * float3(5, 5, 5);
// log r1.x, r0.x
temp1.x = log2(temp0.x);
// log r1.y, r0.y
temp1.y = log2(temp0.y);
// log r1.z, r0.z
temp1.z = log2(temp0.z);
// mul r0.xyz, r1, c4.x
temp0.xyz = temp1.xyz * float3(2.2, 2.2, 2.2);
// exp oC0.x, r0.x
out_color.x = exp2(temp0.x);
// exp oC0.y, r0.y
out_color.y = exp2(temp0.y);
// exp oC0.z, r0.z
out_color.z = exp2(temp0.z);
// mov oC0.w, -c1.x
out_color.w = float1(1);
//
return out_color;
}
// Caustics_U_VertexShader6 Vertex_3_0 Has PRES False
struct Caustics_U_VertexShader6_Input
{
float4 position : POSITION;
float4 texcoord : TEXCOORD;
};
struct Caustics_U_VertexShader6_Output
{
float4 position : POSITION;
float2 texcoord : TEXCOORD;
float3 texcoord1 : TEXCOORD1;
};
Caustics_U_VertexShader6_Output Caustics_U_VertexShader6(Caustics_U_VertexShader6_Input i)
{
Caustics_U_VertexShader6_Output o;
float4 temp0, temp1;
// def c0, 1, 0, 0, 0
// dcl_position v0
// dcl_texcoord v1
// dcl_position o0
// dcl_texcoord o1.xy
// dcl_texcoord1 o2.xyz
// mad r0, v0.xyxx, c0.xxyy, c0.yyxx
temp0 = i.position.xyxx * float4(1, 1, 0, 0) + float4(0, 0, 1, 1);
// dp4 r1.x, r0, c14
temp1.x = dot(temp0, (ProjectionI._m03_m13_m23_m33));
// rcp r1.x, r1.x
temp1.x = 1.0f / temp1.x;
// dp4 r1.y, r0, c11
temp1.y = dot(temp0, (ProjectionI._m00_m10_m20_m30));
// dp4 r1.z, r0, c12
temp1.z = dot(temp0, (ProjectionI._m01_m11_m21_m31));
// dp4 r1.w, r0, c13
temp1.w = dot(temp0, (ProjectionI._m02_m12_m22_m32));
// mul r0.xyz, r1.x, r1.yzww
temp0.xyz = temp1.xxx * temp1.yzw;
// rcp r0.w, r0.z
temp0.w = 1.0f / temp0.z;
// mul r0.xyz, r0, r0.w
temp0.xyz = temp0.xyz * temp0.www;
// dp3 o2.x, r0, c15
o.texcoord1.x = dot(temp0.xyz, (ViewI._m00_m10_m20_m30).xyz);
// dp3 o2.y, r0, c16
o.texcoord1.y = dot(temp0.xyz, (ViewI._m01_m11_m21_m31).xyz);
// dp3 o2.z, r0, c17
o.texcoord1.z = dot(temp0.xyz, (ViewI._m02_m12_m22_m32).xyz);
// mov o0.xyz, v0
o.position.xyz = i.position.xyz;
// mov o0.w, c0.x
o.position.w = float1(1);
// mov o1.xy, v1
o.texcoord = i.texcoord;
//
return o;
}
// Caustics_PixelShader7 Pixel_3_0 Has PRES True
struct Caustics_PixelShader7_Input
{
float2 texcoord : TEXCOORD;
float3 texcoord1 : TEXCOORD1;
};
float4 Caustics_PixelShader7(Caustics_PixelShader7_Input i) : COLOR
{
/*
PRSI
OutputRegisterOffset: 14
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 1
Unknown3: 0
Unknown4: 0
Unknown5: 14
Unknown6: 1
Mappings: 1
0 - ConstOutput: 0 ConstInput 0
*/
float4 expr14;
{
// Expression_2_1
// mul c14.x, c0.x, (0.12)
expr14.x = Time.x * (0.12);
}
float4 out_color;
float4 temp0, temp1, temp2, temp3;
// def c0, 200, 0.004, 0.4067543, 0.9135376
// def c1, -1, 0.3, 201, 0.005
// def c2, -0.9135376, 0.4067543, 0, 0.9135376
// def c3, 0.75, 5, 2.2, 0
// dcl_texcoord v0.xy
// dcl_texcoord1 v1.xyz
// dcl_2d s0
// dcl_2d s1
// dcl_2d s2
// texld r0, v0, s2
temp0 = tex2D(DepthTextureSampler, i.texcoord.xy);
// mov r0.w, c11.w
temp0.w = (ViewI._m00_m10_m20_m30).w;
// mov r0.y, c12.w
temp0.y = (ViewI._m01_m11_m21_m31).w;
// mov r0.z, c13.w
temp0.z = (ViewI._m02_m12_m22_m32).w;
// mad r0.xyz, r0.x, v1.yzxw, r0.yzww
temp0.xyz = temp0.xxx * i.texcoord1.yzx + temp0.yzw;
// add r1, -r0.y, c0.x
temp1 = -temp0.y + float4(200, 200, 200, 200);
// texkill r1
clip(temp1);
// rcp r0.w, c6.z
temp0.w = 1.0f / DirectionalLight[0].Direction.z;
// mul r1.xy, r0.y, c6
temp1.xy = temp0.yy * DirectionalLight[0].Direction.xy;
// mad r1.xy, r1, -r0.w, r0.zxzw
temp1.xy = temp1.xy * -temp0.ww + temp0.zx;
// mul r1.xy, r1, c0.y
temp1.xy = temp1.xy * float2(0.004, 0.004);
// dp2add r1.w, r1, c2, c2.z
temp1.w = dot(temp1.xy, float2(-0.9135376, 0.40675429)) + float1(0);
// mov r2.zw, c0
temp2.zw = float2(0.40675429, 0.9135376);
// dp2add r1.z, r1, r2.zwzw, c14.x
temp1.z = dot(temp1.xy, temp2.zw) + expr14.x;
// texld r2, r1.zwzw, s1
temp2 = tex2D(CausticSamplerSampler, temp1.zw);
// dp2add r2.w, r1, c2.wyzw, c2.z
temp2.w = dot(temp1.xy, float2(0.9135376, 0.40675429)) + float1(0);
// mov r3.xy, c2
temp3.xy = float2(-0.9135376, 0.40675429);
// dp2add r2.z, r1, r3.yxzw, c14.x
temp2.z = dot(temp1.xy, temp3.yx) + expr14.x;
// texld r3, r2.zwzw, s1
temp3 = tex2D(CausticSamplerSampler, temp2.zw);
// add r1.xy, r2, r3
temp1.xy = temp2.xy + temp3.xy;
// add r1.xy, r1, c1.x
temp1.xy = temp1.xy + float2(-1, -1);
// mad r1.zw, r1.xyxy, c1.y, r1
temp1.zw = temp1.xy * float2(0.3, 0.3) + temp1.zw;
// mad r1.xy, r1, -c1.y, -r2.zwzw
temp1.xy = temp1.xy * float2(-0.3, -0.3) + -temp2.zw;
// texld r2, r1.zwzw, s1
temp2 = tex2D(CausticSamplerSampler, temp1.zw);
// texld r1, r1, s1
temp1 = tex2D(CausticSamplerSampler, temp1.xy);
// mul r0.w, r2.w, r1.w
temp0.w = temp2.w * temp1.w;
// mul r0.w, r0.w, r0.w
temp0.w = temp0.w * temp0.w;
// add r1.x, -r0.y, c1.z
temp1.x = -temp0.y + float1(201);
// mul r1.xy, r1.x, c1.w
temp1.xy = temp1.xx * float2(0.005, 0.005);
// mov r1.zw, c2.z
temp1.zw = float2(0, 0);
// texldl r1, r1, s0
temp1 = tex2Dlod(DepthLutSamplerSampler, temp1);
// mul r0.w, r0.w, r1.w
temp0.w = temp0.w * temp1.w;
// mov r1.x, c1.x
temp1.x = float1(-1);
// mov r2.x, c3.x
temp2.x = float1(0.75);
// lrp r3.xyz, r2.x, -r1.x, c5
temp3.xyz = lerp(DirectionalLight[0].Color.xyz, -temp1.xxx, temp2.xxx);
// mul r1.xyz, r0.w, r3
temp1.xyz = temp0.www * temp3.xyz;
// dsy r2.xyz, r0.yzxw
temp2.xyz = ddy(temp0.yzx);
// dsx r0.xyz, r0
temp0.xyz = ddx(temp0.xyz);
// mul r3.xyz, r2, r0
temp3.xyz = temp2.xyz * temp0.xyz;
// mad r0.xyz, r2.zxyw, r0.yzxw, -r3
temp0.xyz = temp2.zxy * temp0.yzx + -temp3.xyz;
// nrm r2.xyz, r0
temp2.xyz = normalize(temp0.xyz).xyz;
// dp3 r0.x, r2, c6
temp0.x = dot(temp2.xyz, DirectionalLight[0].Direction.xyz);
// max r1.w, r0.x, c2.z
temp1.w = max(temp0.x, float1(0));
// mul r0.xyz, r1, r1.w
temp0.xyz = temp1.xyz * temp1.www;
// mul r0.xyz, r0, c3.y
temp0.xyz = temp0.xyz * float3(5, 5, 5);
// log r1.x, r0.x
temp1.x = log2(temp0.x);
// log r1.y, r0.y
temp1.y = log2(temp0.y);
// log r1.z, r0.z
temp1.z = log2(temp0.z);
// mul r0.xyz, r1, c3.z
temp0.xyz = temp1.xyz * float3(2.2, 2.2, 2.2);
// exp oC0.x, r0.x
out_color.x = exp2(temp0.x);
// exp oC0.y, r0.y
out_color.y = exp2(temp0.y);
// exp oC0.z, r0.z
out_color.z = exp2(temp0.z);
// mov oC0.w, -c1.x
out_color.w = float1(1);
//
return out_color;
}
// Caustics_VertexShader8 Vertex_3_0 Has PRES False
struct Caustics_VertexShader8_Input
{
float4 position : POSITION;
float4 texcoord : TEXCOORD;
};
struct Caustics_VertexShader8_Output
{
float4 position : POSITION;
float2 texcoord : TEXCOORD;
float3 texcoord1 : TEXCOORD1;
};
Caustics_VertexShader8_Output Caustics_VertexShader8(Caustics_VertexShader8_Input i)
{
Caustics_VertexShader8_Output o;
float4 temp0, temp1;
// def c0, 1, 0, 0, 0
// dcl_position v0
// dcl_texcoord v1
// dcl_position o0
// dcl_texcoord o1.xy
// dcl_texcoord1 o2.xyz
// mad r0, v0.xyxx, c0.xxyy, c0.yyxx
temp0 = i.position.xyxx * float4(1, 1, 0, 0) + float4(0, 0, 1, 1);
// dp4 r1.x, r0, c14
temp1.x = dot(temp0, (ProjectionI._m03_m13_m23_m33));
// rcp r1.x, r1.x
temp1.x = 1.0f / temp1.x;
// dp4 r1.y, r0, c11
temp1.y = dot(temp0, (ProjectionI._m00_m10_m20_m30));
// dp4 r1.z, r0, c12
temp1.z = dot(temp0, (ProjectionI._m01_m11_m21_m31));
// dp4 r1.w, r0, c13
temp1.w = dot(temp0, (ProjectionI._m02_m12_m22_m32));
// mul r0.xyz, r1.x, r1.yzww
temp0.xyz = temp1.xxx * temp1.yzw;
// rcp r0.w, r0.z
temp0.w = 1.0f / temp0.z;
// mul r0.xyz, r0, r0.w
temp0.xyz = temp0.xyz * temp0.www;
// dp3 o2.x, r0, c15
o.texcoord1.x = dot(temp0.xyz, (ViewI._m00_m10_m20_m30).xyz);
// dp3 o2.y, r0, c16
o.texcoord1.y = dot(temp0.xyz, (ViewI._m01_m11_m21_m31).xyz);
// dp3 o2.z, r0, c17
o.texcoord1.z = dot(temp0.xyz, (ViewI._m02_m12_m22_m32).xyz);
// mov o0.xyz, v0
o.position.xyz = i.position.xyz;
// mov o0.w, c0.x
o.position.w = float1(1);
// mov o1.xy, v1
o.texcoord = i.texcoord;
//
return o;
}
// Tint_PixelShader9 Pixel_3_0 Has PRES False
struct Tint_PixelShader9_Input
{
float2 texcoord : TEXCOORD;
float3 texcoord1 : TEXCOORD1;
};
float4 Tint_PixelShader9(Tint_PixelShader9_Input i) : COLOR
{
float4 out_color;
float4 temp0, temp1;
// def c0, 200, 201, 0.005, 0
// def c1, 2.2, 0, 0, 0
// dcl_texcoord v0.xy
// dcl_texcoord1 v1.z
// dcl_2d s0
// dcl_2d s1
// texld r0, v0, s1
temp0 = tex2D(DepthTextureSampler, i.texcoord.xy);
// mad r0.x, r0.x, v1.z, c13.w
temp0.x = temp0.x * i.texcoord1.z + (ViewI._m02_m12_m22_m32).w;
// add r1, -r0.x, c0.x
temp1 = -temp0.x + float4(200, 200, 200, 200);
// add r0.x, -r0.x, c0.y
temp0.x = -temp0.x + float1(201);
// texkill r1
clip(temp1);
// mul r0.xy, r0.x, c0.z
temp0.xy = temp0.xx * float2(0.005, 0.005);
// mov r0.zw, c0.w
temp0.zw = float2(0, 0);
// texldl r0, r0, s0
temp0 = tex2Dlod(DepthLutSamplerSampler, temp0);
// log r1.x, r0.x
temp1.x = log2(temp0.x);
// log r1.y, r0.y
temp1.y = log2(temp0.y);
// log r1.z, r0.z
temp1.z = log2(temp0.z);
// mov oC0.w, r0.w
out_color.w = temp0.w;
// mul r0.xyz, r1, c1.x
temp0.xyz = temp1.xyz * float3(2.2, 2.2, 2.2);
// exp oC0.x, r0.x
out_color.x = exp2(temp0.x);
// exp oC0.y, r0.y
out_color.y = exp2(temp0.y);
// exp oC0.z, r0.z
out_color.z = exp2(temp0.z);
//
return out_color;
}
// Tint_VertexShader10 Vertex_3_0 Has PRES False
struct Tint_VertexShader10_Input
{
float4 position : POSITION;
float4 texcoord : TEXCOORD;
};
struct Tint_VertexShader10_Output
{
float4 position : POSITION;
float2 texcoord : TEXCOORD;
float3 texcoord1 : TEXCOORD1;
};
Tint_VertexShader10_Output Tint_VertexShader10(Tint_VertexShader10_Input i)
{
Tint_VertexShader10_Output o;
float4 temp0, temp1;
// def c0, 1, 0, 0, 0
// dcl_position v0
// dcl_texcoord v1
// dcl_position o0
// dcl_texcoord o1.xy
// dcl_texcoord1 o2.xyz
// mad r0, v0.xyxx, c0.xxyy, c0.yyxx
temp0 = i.position.xyxx * float4(1, 1, 0, 0) + float4(0, 0, 1, 1);
// dp4 r1.x, r0, c14
temp1.x = dot(temp0, (ProjectionI._m03_m13_m23_m33));
// rcp r1.x, r1.x
temp1.x = 1.0f / temp1.x;
// dp4 r1.y, r0, c11
temp1.y = dot(temp0, (ProjectionI._m00_m10_m20_m30));
// dp4 r1.z, r0, c12
temp1.z = dot(temp0, (ProjectionI._m01_m11_m21_m31));
// dp4 r1.w, r0, c13
temp1.w = dot(temp0, (ProjectionI._m02_m12_m22_m32));
// mul r0.xyz, r1.x, r1.yzww
temp0.xyz = temp1.xxx * temp1.yzw;
// rcp r0.w, r0.z
temp0.w = 1.0f / temp0.z;
// mul r0.xyz, r0, r0.w
temp0.xyz = temp0.xyz * temp0.www;
// dp3 o2.x, r0, c15
o.texcoord1.x = dot(temp0.xyz, (ViewI._m00_m10_m20_m30).xyz);
// dp3 o2.y, r0, c16
o.texcoord1.y = dot(temp0.xyz, (ViewI._m01_m11_m21_m31).xyz);
// dp3 o2.z, r0, c17
o.texcoord1.z = dot(temp0.xyz, (ViewI._m02_m12_m22_m32).xyz);
// mov o0.xyz, v0
o.position.xyz = i.position.xyz;
// mov o0.w, c0.x
o.position.w = float1(1);
// mov o1.xy, v1
o.texcoord = i.texcoord;
//
return o;
}
technique Tint
{
pass p0
{
VertexShader = compile vs_3_0 Tint_VertexShader10(); // 21
PixelShader = compile ps_3_0 Tint_PixelShader9(); // 22
ZEnable = 0;
ZWriteEnable = 0;
CullMode = 1;
AlphaTestEnable = 0;
AlphaBlendEnable = 1;
SrcBlend = 9;
DestBlend = 1;
}
}
technique Caustics
{
pass p0
{
VertexShader = compile vs_3_0 Caustics_VertexShader8(); // 23
PixelShader = compile ps_3_0 Caustics_PixelShader7(); // 24
ZEnable = 0;
ZWriteEnable = 0;
CullMode = 1;
AlphaTestEnable = 0;
AlphaBlendEnable = 1;
SrcBlend = 2;
DestBlend = 2;
}
}
technique Caustics_U
{
pass p0
{
VertexShader = compile vs_3_0 Caustics_U_VertexShader6(); // 25
PixelShader = compile ps_3_0 Caustics_U_PixelShader5(); // 26
ZEnable = 0;
ZWriteEnable = 0;
CullMode = 1;
AlphaTestEnable = 0;
AlphaBlendEnable = 1;
SrcBlend = 2;
DestBlend = 2;
}
}
technique _Tint_M
{
pass p0
{
VertexShader = compile vs_2_0 _Tint_M_VertexShader4(); // 27
PixelShader = compile ps_2_0 _Tint_M_PixelShader3(); // 28
ZEnable = 0;
ZWriteEnable = 0;
CullMode = 1;
AlphaTestEnable = 0;
AlphaBlendEnable = 1;
SrcBlend = 9;
DestBlend = 1;
}
}
technique _Caustics_M
{
pass p0
{
VertexShader = compile vs_2_0 _Caustics_M_VertexShader2(); // 29
PixelShader = compile ps_2_0 _Caustics_M_PixelShader1(); // 30
ZEnable = 0;
ZWriteEnable = 0;
CullMode = 1;
AlphaTestEnable = 0;
AlphaBlendEnable = 0;
}
}