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

1253 lines
42 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) : register(ps_2_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;>;
column_major float4x4 ShadowMapWorldToShadow : register(vs_3_0, c113) <bool unmanaged = 1;>;
float OpacityOverride <bool unmanaged = 1;> = { 1 };
float3 TintColor <bool unmanaged = 1;> = { 1, 1, 1 };
float3 EyePosition : register(ps_3_0, c123) : register(vs_2_0, c123) <bool unmanaged = 1;>;
column_major float4x4 ViewProjection : register(ps_3_0, c119) : register(vs_2_0, c119) : register(vs_3_0, c119) <bool unmanaged = 1;>;
float4 WorldBones[128] <bool unmanaged = 1;>;
bool HasShadow <string UIWidget = "None"; string SasBindAddress = "Sas.HasShadow";>;
texture ShadowMap <string UIWidget = "None"; string SasBindAddress = "Sas.Shadow[0].ShadowMap";>; // 4
sampler2D ShadowMapSampler : register(ps_3_0, s0) <string Texture = "ShadowMap"; string UIWidget = "None"; string SasBindAddress = "Sas.Shadow[0].ShadowMap";> =
sampler_state
{
Texture = <ShadowMap>; // 7
MinFilter = 1;
MagFilter = 1;
MipFilter = 0;
AddressU = 3;
AddressV = 3;
};
float4 Shadowmap_Zero_Zero_OneOverMapSize_OneOverMapSize : register(ps_3_0, c11) <string UIWidget = "None"; string SasBindAddress = "Sas.Shadow[0].Zero_Zero_OneOverMapSize_OneOverMapSize";>;
texture StaticDisplacementTexture <string SasBindAddress = "Water.StaticDisplacementTexture";>; // 13
sampler2D StaticDisplacementTextureSampler : register(ps_2_0, s0) <string Texture = "StaticDisplacementTexture"; string SasBindAddress = "Water.StaticDisplacementTexture";> =
sampler_state
{
Texture = <StaticDisplacementTexture>; // 15
MinFilter = 2;
MagFilter = 2;
MipFilter = 2;
AddressU = 1;
AddressV = 1;
};
texture WaterReflectionTexture <string UIWidget = "None"; string SasBindAddress = "Water.ReflectionTexture";>; // 18
sampler2D WaterReflectionTextureSampler <string Texture = "WaterReflectionTexture"; string UIWidget = "None"; string SasBindAddress = "Water.ReflectionTexture";> =
sampler_state
{
Texture = <WaterReflectionTexture>; // 21
MipFilter = 1;
MinFilter = 2;
MagFilter = 2;
AddressU = 3;
AddressV = 3;
};
texture WaterRefractionTexture <string UIWidget = "None"; string SasBindAddress = "Water.RefractionTexture";>; // 25
sampler2D WaterRefractionTextureSampler : register(ps_2_0, s1) <string Texture = "WaterRefractionTexture"; string UIWidget = "None"; string SasBindAddress = "Water.RefractionTexture";> =
sampler_state
{
Texture = <WaterRefractionTexture>; // 28
MipFilter = 1;
MinFilter = 2;
MagFilter = 2;
AddressU = 3;
AddressV = 3;
};
texture EnvironmentTexture <string UIWidget = "None"; string SasBindAddress = "Water.LightSpaceEnvironmentMap"; string ResourceType = "Cube";>; // 32
samplerCUBE EnvironmentTextureSampler <string Texture = "EnvironmentTexture"; string UIWidget = "None"; string SasBindAddress = "Water.LightSpaceEnvironmentMap"; string ResourceType = "Cube";> =
sampler_state
{
Texture = <EnvironmentTexture>; // 36
MinFilter = 2;
MagFilter = 2;
MipFilter = 2;
AddressU = 3;
AddressV = 3;
AddressW = 3;
};
struct
{
float4 ScaleUV_OffsetUV;
} Shroud : register(vs_3_0, c35) <string UIWidget = "None"; string SasBindAddress = "Terrain.Shroud";> = { 1, 1, 0, 0 };
texture ShroudSampler <string UIWidget = "None"; string SasBindAddress = "Terrain.Shroud.Texture";>; // 43
sampler2D ShroudSamplerSampler <string Texture = "ShroudSampler"; string UIWidget = "None"; string SasBindAddress = "Terrain.Shroud.Texture";> =
sampler_state
{
Texture = <ShroudSampler>; // 46
MinFilter = 2;
MagFilter = 2;
MipFilter = 2;
AddressU = 3;
AddressV = 3;
};
float4 MaterialColorDiffuse <string UIName = "Diffuse Material Color"; string UIWidget = "Color";> = { 1, 1, 1, 0 };
texture Foam <string UIName = "FoamMap";>; // 52
sampler2D FoamSampler : register(ps_2_0, s2) <string Texture = "Foam"; string UIName = "FoamMap";> =
sampler_state
{
Texture = <Foam>; // 54
MinFilter = 3;
MagFilter = 2;
MipFilter = 2;
AddressU = 1;
AddressV = 1;
};
float FoamHeight <string UIName = "Foam Mask Height"; string UIWidget = "Slider"; float UIMax = 25; float UIMin = -25; float UIStep = 0.1;>;
float FoamBlend <string UIName = "Foam Mask Blend"; string UIWidget = "Slider"; float UIMax = 25; float UIMin = 0.1; float UIStep = 0.1;> = { 1 };
float Foam1Scalar <string UIName = "Foam 1 Scale"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = 0; float UIStep = 0.01;> = { 1 };
float Foam2Scalar <string UIName = "Foam 2 Scale"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = 0; float UIStep = 0.01;> = { 1 };
float FoamSpeed <string UIName = "Foam Speed"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = -50; float UIStep = 0.01;> = { 1 };
float OctaveScalar <string UIName = "Octave Scale"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = 0; float UIStep = 0.01;> = { 1 };
float OctaveDivergenceAngle <string UIName = "Octave Divergence Angle"; string UIWidget = "Slider"; float UIMax = 180; float UIMin = 0; float UIStep = 0.5;>;
float OctaveSpeed <string UIName = "Octave Speed"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = 0; float UIStep = 0.01;> = { 1 };
float OctaveDivergenceSpeed <string UIName = "Octave Divergence Speed"; string UIWidget = "Slider"; float UIMax = 10; float UIMin = 0; float UIStep = 0.001;>;
float WaveAmplitude : register(vs_2_0, c31) : register(vs_3_0, c36) <string UIName = "Wave Amplitude"; string UIWidget = "Slider"; float UIMin = 0; float UIMax = 3; float UIStep = 0.1;> = { 3 };
float WaveFrequency : register(vs_2_0, c32) : register(vs_3_0, c37) <string UIName = "Wave frequency"; string UIWidget = "Slider"; float UIMin = 0; float UIMax = 6; float UIStep = 0.01;> = { 0.2 };
texture DisplacementTexture <string SasBindAddress = "Water.DisplacementTexture";>; // 79
sampler2D DisplacementTextureSampler <string Texture = "DisplacementTexture"; string SasBindAddress = "Water.DisplacementTexture";> =
sampler_state
{
Texture = <DisplacementTexture>; // 81
MinFilter = 2;
MagFilter = 2;
MipFilter = 1;
AddressU = 3;
AddressV = 3;
};
float DisplacementTextureSize <string SasBindAddress = "Water.DisplacementTextureSize";>;
struct
{
float frequency;
float amplitude;
float phase;
float2 direction;
} wave[3] : register(vs_2_0, c11) : register(vs_3_0, c11) = { 0.1, 1, 1, 0.2, -0.7, 0.25, 0.5, 0.5, -1, -0.7, 0.15, 0.5, 1.5, -1, 0.2 };
column_major float4x3 World : World : register(vs_3_0, c32);
float Time : Time : register(vs_2_0, c33) : register(vs_3_0, c38);
// PS_WaterShadowMap_Array_Shader_0 Pixel_3_0 Has PRES True
struct PS_WaterShadowMap_Array_Shader_0_Input
{
float4 color : COLOR;
float4 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float4 texcoord3 : TEXCOORD3;
float4 texcoord4 : TEXCOORD4;
float2 texcoord5 : TEXCOORD5;
};
float4 PS_WaterShadowMap_Array_Shader_0(PS_WaterShadowMap_Array_Shader_0_Input i) : COLOR
{
/*
PRSI
OutputRegisterOffset: 11
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 1
Unknown3: 0
Unknown4: 0
Unknown5: 11
Unknown6: 1
Mappings: 1
0 - ConstOutput: 0 ConstInput 0
*/
float4 expr11;
{
// Expression_2_1
// rcp c11.x, c0.x
expr11.x = 1.0f / (DisplacementTextureSize.x);
}
float4 out_color;
float4 temp0, temp1, temp2, temp3, temp4;
// def c0, 2, -1, 1, 0
// def c1, 50, 0.5, 0.2, 2.2
// def c2, 50, 0, 1, 0.025
// def c3, 3, 0.15, -0.1, 0
// dcl_color v0.w
// dcl_texcoord v1
// dcl_texcoord1 v2
// dcl_texcoord3 v3
// dcl_texcoord4 v4
// dcl_texcoord5 v5.xy
// dcl_2d s0
// dcl_2d s1
// dcl_2d s2
// dcl_cube s3
// dcl_2d s4
// dcl_2d s5
// dcl_2d s6
// mov r0.zw, c0
temp0.zw = float2(1, 0);
// mad r0.xy, c11.x, r0.zwzw, v4
temp0.xy = expr11.xx * temp0.zw + i.texcoord4.xy;
// texld r1, r0, s6
temp1 = tex2D(DisplacementTextureSampler, temp0.xy);
// texld r2, v4, s6
temp2 = tex2D(DisplacementTextureSampler, i.texcoord4.xy);
// add r0.x, r1.z, -r2.z
temp0.x = temp1.z + -temp2.z;
// mad r0.zw, c11.x, r0.xywz, v4.xyxy
temp0.zw = expr11.xx * temp0.wz + i.texcoord4.xy;
// texld r1, r0.zwzw, s6
temp1 = tex2D(DisplacementTextureSampler, temp0.zw);
// add r0.y, -r2.z, r1.z
temp0.y = -temp2.z + temp1.z;
// mul r0.xy, r0, c1.x
temp0.xy = temp0.xy * float2(50, 50);
// texld r1, v2, s0
temp1 = tex2D(StaticDisplacementTextureSampler, i.texcoord1.xy);
// mad r1.xyz, r1, c0.x, c0.y
temp1.xyz = temp1.xyz * float3(2, 2, 2) + float3(-1, -1, -1);
// texld r2, v2.zwzw, s0
temp2 = tex2D(StaticDisplacementTextureSampler, i.texcoord1.zw);
// mad r1.xyz, r2, c0.x, r1
temp1.xyz = temp2.xyz * float3(2, 2, 2) + temp1.xyz;
// add r1.xyz, r1, c0.y
temp1.xyz = temp1.xyz + float3(-1, -1, -1);
// mov r0.z, c1.y
temp0.z = float1(0.5);
// mad r0.xyz, r1, c1.z, r0
temp0.xyz = temp1.xyz * float3(0.2, 0.2, 0.2) + temp0.xyz;
// nrm r1.xyz, r0
temp1.xyz = normalize(temp0.xyz).xyz;
// mad r0.xyz, r1, c2.x, c2.yyzw
temp0.xyz = temp1.xyz * float3(50, 50, 50) + float3(0, 0, 1);
// nrm r1.xyz, r0
temp1.xyz = normalize(temp0.xyz).xyz;
// add r0.xyz, c123, -v3
temp0.xyz = EyePosition.xyz + -i.texcoord3.xyz;
// nrm r2.xyz, r0
temp2.xyz = normalize(temp0.xyz).xyz;
// dp3 r0.x, r2, r1
temp0.x = dot(temp2.xyz, temp1.xyz);
// add r0.y, r0.x, r0.x
temp0.y = temp0.x + temp0.x;
// add r0.x, -r0.x, c0.z
temp0.x = -temp0.x + float1(1);
// mad r0.yzw, r1.xxyz, -r0.y, r2.xxyz
temp0.yzw = temp1.xyz * -temp0.yyy + temp2.xyz;
// mov r0.yzw, -r0
temp0.yzw = -temp0.yzw;
// texld r2, r0.yzww, s3
temp2 = texCUBE(EnvironmentTextureSampler, temp0.yzw);
// log r0.y, r2.x
temp0.y = log2(temp2.x);
// log r0.z, r2.y
temp0.z = log2(temp2.y);
// log r0.w, r2.z
temp0.w = log2(temp2.z);
// mul r0.yzw, r0, c1.w
temp0.yzw = temp0.yzw * float3(2.2, 2.2, 2.2);
// exp r2.x, r0.y
temp2.x = exp2(temp0.y);
// exp r2.y, r0.z
temp2.y = exp2(temp0.z);
// exp r2.z, r0.w
temp2.z = exp2(temp0.w);
// mul r0.yzw, r2.xxyz, c5.xxyz
temp0.yzw = temp2.xyz * DirectionalLight[0].Color.xyz;
// mul r0.xyz, r0.x, r0.yzww
temp0.xyz = temp0.xxx * temp0.yzw;
// mul r1.zw, r1.xyxy, c1.z
temp1.zw = temp1.xy * float2(0.2, 0.2);
// mad r1.xy, r1, c3.y, v4.zwzw
temp1.xy = temp1.xy * float2(0.15, 0.15) + i.texcoord4.zw;
// mad r2, v3.xyzx, c0.zzzw, c0.wwwz
temp2 = i.texcoord3.xyzx * float4(1, 1, 1, 0) + float4(0, 0, 0, 1);
// dp4 r3.x, r2, c119
temp3.x = dot(temp2, (ViewProjection._m00_m10_m20_m30));
// dp4 r3.y, r2, c120
temp3.y = dot(temp2, (ViewProjection._m01_m11_m21_m31));
// dp4 r0.w, r2, c122
temp0.w = dot(temp2, (ViewProjection._m03_m13_m23_m33));
// add r2.xy, r3, r0.w
temp2.xy = temp3.xy + temp0.ww;
// rcp r0.w, r0.w
temp0.w = 1.0f / temp0.w;
// mul r2.xy, r2, c1.y
temp2.xy = temp2.xy * float2(0.5, 0.5);
// mad r1.zw, r2.xyxy, r0.w, r1
temp1.zw = temp2.xy * temp0.ww + temp1.zw;
// texld r2, r1.zwzw, s1
temp2 = tex2D(WaterReflectionTextureSampler, temp1.zw);
// texld r3, v1, s5
temp3 = tex2D(FoamSampler, i.texcoord.xy);
// texld r4, v1.zwzw, s5
temp4 = tex2D(FoamSampler, i.texcoord.zw);
// mul r3.xyz, r3, r4
temp3.xyz = temp3.xyz * temp4.xyz;
// mul r3.xyz, r3, r3
temp3.xyz = temp3.xyz * temp3.xyz;
// mul r0.w, c1.z, v3.w
temp0.w = float1(0.2) * i.texcoord3.w;
// max r1.z, r0.w, c2.w
temp1.z = max(temp0.w, float1(0.025));
// min r0.w, r1.z, c3.x
temp0.w = min(temp1.z, float1(3));
// mul r3.xyz, r3, r0.w
temp3.xyz = temp3.xyz * temp0.www;
// mul r3.xyz, r3, c5
temp3.xyz = temp3.xyz * DirectionalLight[0].Color.xyz;
// mad r2.xyz, r2, c1.y, r3
temp2.xyz = temp2.xyz * float3(0.5, 0.5, 0.5) + temp3.xyz;
// mad r0.xyz, r0, c0.x, r2
temp0.xyz = temp0.xyz * float3(2, 2, 2) + temp2.xyz;
// texld r1, r1, s2
temp1 = tex2D(WaterRefractionTextureSampler, temp1.xy);
// texld r2, v4.zwzw, s2
temp2 = tex2D(WaterRefractionTextureSampler, i.texcoord4.zw);
// add r3.xyz, r1, -r2
temp3.xyz = temp1.xyz + -temp2.xyz;
// dp3 r0.w, r3, r3
temp0.w = dot(temp3.xyz, temp3.xyz);
// rsq r0.w, r0.w
temp0.w = 1 / sqrt(temp0.w);
// rcp r0.w, r0.w
temp0.w = 1.0f / temp0.w;
// add r0.w, r0.w, c3.z
temp0.w = temp0.w + float1(-0.1);
// cmp r1.xyz, r0.w, r2, r1
temp1.xyz = (temp0.www >= 0) ? temp2.xyz : temp1.xyz;
// texld r2, v5, s4
temp2 = tex2D(ShroudSamplerSampler, i.texcoord5.xy);
// mad oC0.xyz, r2.x, r0, r1
out_color.xyz = temp2.xxx * temp0.xyz + temp1.xyz;
// mov oC0.w, v0.w
out_color.w = i.color.w;
//
return out_color;
}
// PS_WaterShadowMap_Array_Shader_1 Pixel_3_0 Has PRES True
struct PS_WaterShadowMap_Array_Shader_1_Input
{
float4 color : COLOR;
float4 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float3 texcoord2 : TEXCOORD2;
float4 texcoord3 : TEXCOORD3;
float4 texcoord4 : TEXCOORD4;
float2 texcoord5 : TEXCOORD5;
};
float4 PS_WaterShadowMap_Array_Shader_1(PS_WaterShadowMap_Array_Shader_1_Input i) : COLOR
{
/*
PRSI
OutputRegisterOffset: 12
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 1
Unknown3: 0
Unknown4: 0
Unknown5: 12
Unknown6: 1
Mappings: 1
0 - ConstOutput: 0 ConstInput 0
*/
float4 expr12;
{
// Expression_2_1
// rcp c12.x, c0.x
expr12.x = 1.0f / (DisplacementTextureSize.x);
}
float4 out_color;
float4 temp0, temp1, temp2, temp3, temp4;
// def c0, 2, -1, 1, 0
// def c1, 50, 0.5, 0.2, 0.01
// def c2, 50, 0, 1, 0.25
// def c3, 2.2, 0.025, 3, 0.15
// def c4, -0.1, 0, 0, 0
// dcl_color v0.w
// dcl_texcoord v1
// dcl_texcoord1 v2
// dcl_texcoord2 v3.xyz
// dcl_texcoord3 v4
// dcl_texcoord4 v5
// dcl_texcoord5 v6.xy
// dcl_2d s0
// dcl_2d s1
// dcl_2d s2
// dcl_2d s3
// dcl_cube s4
// dcl_2d s5
// dcl_2d s6
// dcl_2d s7
// mov r0.zw, c0
temp0.zw = float2(1, 0);
// mad r0.xy, c12.x, r0.zwzw, v5
temp0.xy = expr12.xx * temp0.zw + i.texcoord4.xy;
// texld r1, r0, s7
temp1 = tex2D(DisplacementTextureSampler, temp0.xy);
// texld r2, v5, s7
temp2 = tex2D(DisplacementTextureSampler, i.texcoord4.xy);
// add r0.x, r1.z, -r2.z
temp0.x = temp1.z + -temp2.z;
// mad r0.zw, c12.x, r0.xywz, v5.xyxy
temp0.zw = expr12.xx * temp0.wz + i.texcoord4.xy;
// texld r1, r0.zwzw, s7
temp1 = tex2D(DisplacementTextureSampler, temp0.zw);
// add r0.y, -r2.z, r1.z
temp0.y = -temp2.z + temp1.z;
// mul r0.xy, r0, c1.x
temp0.xy = temp0.xy * float2(50, 50);
// texld r1, v2, s1
temp1 = tex2D(StaticDisplacementTextureSampler, i.texcoord1.xy);
// mad r1.xyz, r1, c0.x, c0.y
temp1.xyz = temp1.xyz * float3(2, 2, 2) + float3(-1, -1, -1);
// texld r2, v2.zwzw, s1
temp2 = tex2D(StaticDisplacementTextureSampler, i.texcoord1.zw);
// mad r1.xyz, r2, c0.x, r1
temp1.xyz = temp2.xyz * float3(2, 2, 2) + temp1.xyz;
// add r1.xyz, r1, c0.y
temp1.xyz = temp1.xyz + float3(-1, -1, -1);
// mov r0.z, c1.y
temp0.z = float1(0.5);
// mad r0.xyz, r1, c1.z, r0
temp0.xyz = temp1.xyz * float3(0.2, 0.2, 0.2) + temp0.xyz;
// nrm r1.xyz, r0
temp1.xyz = normalize(temp0.xyz).xyz;
// mul r0.xy, r1, c1.w
temp0.xy = temp1.xy * float2(0.01, 0.01);
// mad r1.xyz, r1, c2.x, c2.yyzw
temp1.xyz = temp1.xyz * float3(50, 50, 50) + float3(0, 0, 1);
// mov r0.z, c0.w
temp0.z = float1(0);
// add r0.xyz, r0, v3
temp0.xyz = temp0.xyz + i.texcoord2.xyz;
// add r2.xy, r0, c11.zxzw
temp2.xy = temp0.xy + Shadowmap_Zero_Zero_OneOverMapSize_OneOverMapSize.zx;
// texld r2, r2, s0
temp2 = tex2D(ShadowMapSampler, temp2.xy);
// mov r2.y, r2.x
temp2.y = temp2.x;
// add r3.xy, r0, c11.yzzw
temp3.xy = temp0.xy + Shadowmap_Zero_Zero_OneOverMapSize_OneOverMapSize.yz;
// texld r3, r3, s0
temp3 = tex2D(ShadowMapSampler, temp3.xy);
// mov r2.z, r3.x
temp2.z = temp3.x;
// add r3.xy, r0, c11.wzzw
temp3.xy = temp0.xy + Shadowmap_Zero_Zero_OneOverMapSize_OneOverMapSize.wz;
// texld r3, r3, s0
temp3 = tex2D(ShadowMapSampler, temp3.xy);
// mov r2.w, r3.x
temp2.w = temp3.x;
// texld r3, r0, s0
temp3 = tex2D(ShadowMapSampler, temp0.xy);
// mov r2.x, r3.x
temp2.x = temp3.x;
// add r0, -r0.z, r2
temp0 = -temp0.z + temp2;
// cmp r0, r0, c0.z, c0.w
temp0 = (temp0 >= 0) ? float4(1, 1, 1, 1) : float4(0, 0, 0, 0);
// dp4 r0.x, c0.z, r0
temp0.x = dot(float4(1, 1, 1, 1), temp0);
// mul r0.x, r0.x, c2.w
temp0.x = temp0.x * float1(0.25);
// nrm r2.xyz, r1
temp2.xyz = normalize(temp1.xyz).xyz;
// add r0.yzw, c123.xxyz, -v4.xxyz
temp0.yzw = EyePosition.xyz + -i.texcoord3.xyz;
// nrm r1.xyz, r0.yzww
temp1.xyz = normalize(temp0.yzww.xyz).xyz;
// dp3 r0.y, r1, r2
temp0.y = dot(temp1.xyz, temp2.xyz);
// add r0.z, r0.y, r0.y
temp0.z = temp0.y + temp0.y;
// add r0.y, -r0.y, c0.z
temp0.y = -temp0.y + float1(1);
// mad r1.xyz, r2, -r0.z, r1
temp1.xyz = temp2.xyz * -temp0.zzz + temp1.xyz;
// mov r1.xyz, -r1
temp1.xyz = -temp1.xyz;
// texld r1, r1, s4
temp1 = texCUBE(EnvironmentTextureSampler, temp1.xyz);
// log r3.x, r1.x
temp3.x = log2(temp1.x);
// log r3.y, r1.y
temp3.y = log2(temp1.y);
// log r3.z, r1.z
temp3.z = log2(temp1.z);
// mul r1.xyz, r3, c3.x
temp1.xyz = temp3.xyz * float3(2.2, 2.2, 2.2);
// exp r3.x, r1.x
temp3.x = exp2(temp1.x);
// exp r3.y, r1.y
temp3.y = exp2(temp1.y);
// exp r3.z, r1.z
temp3.z = exp2(temp1.z);
// mul r1.xyz, r3, c5
temp1.xyz = temp3.xyz * DirectionalLight[0].Color.xyz;
// mul r0.yzw, r0.y, r1.xxyz
temp0.yzw = temp0.yyy * temp1.xyz;
// mul r0.xyz, r0.x, r0.yzww
temp0.xyz = temp0.xxx * temp0.yzw;
// mul r1.xy, r2, c1.z
temp1.xy = temp2.xy * float2(0.2, 0.2);
// mad r1.zw, r2.xyxy, c3.w, v5
temp1.zw = temp2.xy * float2(0.15, 0.15) + i.texcoord4.zw;
// mad r2, v4.xyzx, c0.zzzw, c0.wwwz
temp2 = i.texcoord3.xyzx * float4(1, 1, 1, 0) + float4(0, 0, 0, 1);
// dp4 r3.x, r2, c119
temp3.x = dot(temp2, (ViewProjection._m00_m10_m20_m30));
// dp4 r3.y, r2, c120
temp3.y = dot(temp2, (ViewProjection._m01_m11_m21_m31));
// dp4 r0.w, r2, c122
temp0.w = dot(temp2, (ViewProjection._m03_m13_m23_m33));
// add r2.xy, r3, r0.w
temp2.xy = temp3.xy + temp0.ww;
// rcp r0.w, r0.w
temp0.w = 1.0f / temp0.w;
// mul r2.xy, r2, c1.y
temp2.xy = temp2.xy * float2(0.5, 0.5);
// mad r1.xy, r2, r0.w, r1
temp1.xy = temp2.xy * temp0.ww + temp1.xy;
// texld r2, r1, s2
temp2 = tex2D(WaterReflectionTextureSampler, temp1.xy);
// texld r3, v1, s6
temp3 = tex2D(FoamSampler, i.texcoord.xy);
// texld r4, v1.zwzw, s6
temp4 = tex2D(FoamSampler, i.texcoord.zw);
// mul r3.xyz, r3, r4
temp3.xyz = temp3.xyz * temp4.xyz;
// mul r3.xyz, r3, r3
temp3.xyz = temp3.xyz * temp3.xyz;
// mul r0.w, c1.z, v4.w
temp0.w = float1(0.2) * i.texcoord3.w;
// max r1.x, r0.w, c3.y
temp1.x = max(temp0.w, float1(0.025));
// min r0.w, r1.x, c3.z
temp0.w = min(temp1.x, float1(3));
// mul r3.xyz, r3, r0.w
temp3.xyz = temp3.xyz * temp0.www;
// mul r3.xyz, r3, c5
temp3.xyz = temp3.xyz * DirectionalLight[0].Color.xyz;
// mad r2.xyz, r2, c1.y, r3
temp2.xyz = temp2.xyz * float3(0.5, 0.5, 0.5) + temp3.xyz;
// mad r0.xyz, r0, c0.x, r2
temp0.xyz = temp0.xyz * float3(2, 2, 2) + temp2.xyz;
// texld r1, r1.zwzw, s3
temp1 = tex2D(WaterRefractionTextureSampler, temp1.zw);
// texld r2, v5.zwzw, s3
temp2 = tex2D(WaterRefractionTextureSampler, i.texcoord4.zw);
// add r3.xyz, r1, -r2
temp3.xyz = temp1.xyz + -temp2.xyz;
// dp3 r0.w, r3, r3
temp0.w = dot(temp3.xyz, temp3.xyz);
// rsq r0.w, r0.w
temp0.w = 1 / sqrt(temp0.w);
// rcp r0.w, r0.w
temp0.w = 1.0f / temp0.w;
// add r0.w, r0.w, c4.x
temp0.w = temp0.w + float1(-0.1);
// cmp r1.xyz, r0.w, r2, r1
temp1.xyz = (temp0.www >= 0) ? temp2.xyz : temp1.xyz;
// texld r2, v6, s5
temp2 = tex2D(ShroudSamplerSampler, i.texcoord5.xy);
// mad oC0.xyz, r2.x, r0, r1
out_color.xyz = temp2.xxx * temp0.xyz + temp1.xyz;
// mov oC0.w, v0.w
out_color.w = i.color.w;
//
return out_color;
}
PixelShader PS_WaterShadowMap_Array[2] = {
compile ps_3_0 PS_WaterShadowMap_Array_Shader_0(), // 85
compile ps_3_0 PS_WaterShadowMap_Array_Shader_1(), // 86
};
// Default_L_PixelShader3 Pixel_2_0 Has PRES False
struct Default_L_PixelShader3_Input
{
float4 color : COLOR;
float3 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
};
float4 Default_L_PixelShader3(Default_L_PixelShader3_Input i) : COLOR
{
float4 out_color;
float4 temp0, temp1, temp2;
// def c0, 0.2, 0, 0, 0
// dcl v0
// dcl t0.xyz
// dcl t1
// dcl_cube s0
// dcl_2d s1
// dcl_2d s2
// texld r0, t0, s0
temp0 = texCUBE(EnvironmentTextureSampler, i.texcoord.xyz);
// mad r0.xyz, r0, c5, v0
temp0.xyz = temp0.xyz * DirectionalLight[0].Color.xyz + i.color.xyz;
// mov r1.xy, t1.wzyx
temp1.xy = i.texcoord1.wz;
// texld r1, r1, s2
temp1 = tex2D(FoamSampler, temp1.xy);
// texld r2, t1, s1
temp2 = tex2D(ShroudSamplerSampler, i.texcoord1.xy);
// mad r0.xyz, r1, c0.x, r0
temp0.xyz = temp1.xyz * float3(0.2, 0.2, 0.2) + temp0.xyz;
// mov r0.w, v0.w
temp0.w = i.color.w;
// mul r0, r2.x, r0
temp0 = temp2.x * temp0;
// mov oC0, r0
out_color = temp0;
//
return out_color;
}
// Default_L_VertexShader4 Vertex_2_0 Has PRES True
struct Default_L_VertexShader4_Output
{
float4 position : POSITION;
float3 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float4 color : COLOR;
};
Default_L_VertexShader4_Output Default_L_VertexShader4(float4 position : POSITION)
{
/*
PRSI
OutputRegisterOffset: 15
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 1
Unknown3: 0
Unknown4: 0
Unknown5: 15
Unknown6: 1
Mappings: 1
0 - ConstOutput: 0 ConstInput 0
*/
float4 expr15;
{
// Expression_2_1
// mul c15.x, c0.x, (0.05)
expr15.x = Time.x * (0.05);
}
Default_L_VertexShader4_Output o;
float4 temp0;
float3 temp1, temp2;
// def c0, 0.01, 0, 0, 0
// def c1, 1, 0, -0, -2
// def c2, 0.16, 0.47, 0.69, 0.6
// dcl_position v0
// mov r0.w, c1.x
temp0.w = float1(1);
// mad r1.xyz, v0.xyxw, c1.xxyw, c1.zzxw
temp1.xyz = position.xyx * float3(1, 1, 0) + float3(-0, -0, 1);
// dp3 r0.z, r1, c13.xyww
temp0.z = dot(temp1.xyz, (World._m02_m12_m22_m32).xyw);
// dp3 r0.x, r1, c11.xyww
temp0.x = dot(temp1.xyz, (World._m00_m10_m20_m30).xyw);
// dp3 r0.y, r1, c12.xyww
temp0.y = dot(temp1.xyz, (World._m01_m11_m21_m31).xyw);
// dp4 oPos.x, r0, c119
o.position.x = dot(temp0, (ViewProjection._m00_m10_m20_m30));
// dp4 oPos.y, r0, c120
o.position.y = dot(temp0, (ViewProjection._m01_m11_m21_m31));
// dp4 oPos.z, r0, c121
o.position.z = dot(temp0, (ViewProjection._m02_m12_m22_m32));
// dp4 oPos.w, r0, c122
o.position.w = dot(temp0, (ViewProjection._m03_m13_m23_m33));
// add r1.xyz, -r0, c123
temp1.xyz = -temp0.xyz + EyePosition.xyz;
// nrm r2.xyz, r1
temp2.xyz = normalize(temp1.xyz).xyz;
// mad r1.xyz, r2.z, c1.zzww, r2
temp1.xyz = temp2.zzz * float3(-0, -0, -2) + temp2.xyz;
// mov oT0.xyz, -r1
o.texcoord = -temp1;
// add r0.zw, r0.xyxy, c14
temp0.zw = temp0.xy + Shroud.ScaleUV_OffsetUV.zw;
// mov r1.x, c0.x
temp1.x = float1(0.01);
// mad oT1.zw, r0.xyyx, r1.x, -c15.x
o.texcoord1.zw = temp0.yx * temp1.xx + -expr15.xx;
// mul oT1.xy, r0.zwzw, c14
o.texcoord1.xy = temp0.zw * Shroud.ScaleUV_OffsetUV.xy;
// mov oD0, c2
o.color = float4(0.16, 0.47, 0.69, 0.6);
//
return o;
}
// Default_M_PixelShader5 Pixel_2_0 Has PRES False
struct Default_M_PixelShader5_Input
{
float4 color : COLOR;
float4 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float4 texcoord2 : TEXCOORD2;
float2 texcoord3 : TEXCOORD3;
};
float4 Default_M_PixelShader5(Default_M_PixelShader5_Input i) : COLOR
{
float4 out_color;
float4 temp0, temp1, temp2, temp3;
float3 temp4;
// def c0, 2, -1, 0.2, 0.5
// def c1, 50, 0.15, -0.15, 0
// def c2, 0.16, 0.57, 0.79, 0
// dcl v0
// dcl t0
// dcl t1
// dcl t2
// dcl t3.xy
// dcl_2d s0
// dcl_2d s1
// dcl_cube s2
// dcl_2d s3
// texld r0, t0, s0
temp0 = tex2D(StaticDisplacementTextureSampler, i.texcoord.xy);
// mad r0.xyz, r0, c0.x, c0.y
temp0.xyz = temp0.xyz * float3(2, 2, 2) + float3(-1, -1, -1);
// mov r1.x, t0.z
temp1.x = i.texcoord.z;
// mov r1.y, t0.w
temp1.y = i.texcoord.w;
// texld r1, r1, s0
temp1 = tex2D(StaticDisplacementTextureSampler, temp1.xy);
// mad r0.xyz, r1, c0.x, r0
temp0.xyz = temp1.xyz * float3(2, 2, 2) + temp0.xyz;
// add r0.xyz, r0, c0.y
temp0.xyz = temp0.xyz + float3(-1, -1, -1);
// mul r0.xyz, r0, c0.z
temp0.xyz = temp0.xyz * float3(0.2, 0.2, 0.2);
// nrm r1.xyz, r0
temp1.xyz = normalize(temp0.xyz).xyz;
// mul r1.w, t1.w, c0.w
temp1.w = i.texcoord1.w * float1(0.5);
// mad r0.xyz, r1, c1.x, r1.w
temp0.xyz = temp1.xyz * float3(50, 50, 50) + temp1.www;
// nrm r1.xyz, r0
temp1.xyz = normalize(temp0.xyz).xyz;
// dp3 r1.w, t1, r1
temp1.w = dot(i.texcoord1.xyz, temp1.xyz);
// add r1.w, r1.w, r1.w
temp1.w = temp1.w + temp1.w;
// mad r0.xyz, r1, -r1.w, t1
temp0.xyz = temp1.xyz * -temp1.www + i.texcoord1.xyz;
// mad r2.x, r1.x, c1.y, t2.z
temp2.x = temp1.x * float1(0.15) + i.texcoord2.z;
// mad r2.y, r1.y, c1.y, t2.w
temp2.y = temp1.y * float1(0.15) + i.texcoord2.w;
// mov r0.xyz, -r0
temp0.xyz = -temp0.xyz;
// mov r1.x, t2.z
temp1.x = i.texcoord2.z;
// mov r1.y, t2.w
temp1.y = i.texcoord2.w;
// texld r0, r0, s2
temp0 = texCUBE(EnvironmentTextureSampler, temp0.xyz);
// texld r2, r2, s1
temp2 = tex2D(WaterRefractionTextureSampler, temp2.xy);
// texld r1, r1, s1
temp1 = tex2D(WaterRefractionTextureSampler, temp1.xy);
// texld r3, t3, s3
temp3 = tex2D(ShroudSamplerSampler, i.texcoord3.xy);
// mul r0.xyz, r0, c5
temp0.xyz = temp0.xyz * DirectionalLight[0].Color.xyz;
// add r4.xyz, r2, -r1
temp4.xyz = temp2.xyz + -temp1.xyz;
// dp3 r0.w, r4, r4
temp0.w = dot(temp4.xyz, temp4.xyz);
// add r0.w, r0.w, c1.z
temp0.w = temp0.w + float1(-0.15);
// cmp r1.xyz, r0.w, r1, r2
temp1.xyz = (temp0.www >= 0) ? temp1.xyz : temp2.xyz;
// mad r0.xyz, r1, c2, r0
temp0.xyz = temp1.xyz * float3(0.16, 0.57, 0.79) + temp0.xyz;
// mul r0.xyz, r3.x, r0
temp0.xyz = temp3.xxx * temp0.xyz;
// mov r0.w, v0.w
temp0.w = i.color.w;
// mov oC0, r0
out_color = temp0;
//
return out_color;
}
// Default_M_VertexShader6 Vertex_2_0 Has PRES True
struct Default_M_VertexShader6_Output
{
float4 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float2 texcoord3 : TEXCOORD3;
float4 position : POSITION;
float4 texcoord2 : TEXCOORD2;
float4 color : COLOR;
};
Default_M_VertexShader6_Output Default_M_VertexShader6(float4 position : POSITION)
{
/*
PRSI
OutputRegisterOffset: 23
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 4
Unknown3: 0
Unknown4: 0
Unknown5: 23
Unknown6: 1
Mappings: 2
0 - ConstOutput: 25 ConstInput 2
1 - ConstOutput: 0 ConstInput 0
*/
float4 expr23;
float4 expr24;
float4 expr25;
float4 expr26;
{
float4 temp0;
float4 temp1;
// Expression_2_1
// mul r0.x, c1.x, c3.x
temp0.x = OctaveSpeed.x * Time.x;
// mul r1.x, r0.x, (0.015)
temp1.x = temp0.x * (0.015);
// mul r0.x, r1.x, c2.x
temp0.x = temp1.x * OctaveDivergenceSpeed.x;
// add c23.x, r1.x, r0.x
expr23.x = temp1.x + temp0.x;
// neg r1.y, r0.x
temp1.y = -temp0.x;
// add c25.x, r1.x, r1.y
expr25.x = temp1.x + temp1.y;
// mov c26.xyz, c0.xyz
expr26.xyz = MaterialColorDiffuse.xyz;
// mov c26.w, (1)
expr26.w = (1);
}
Default_M_VertexShader6_Output o;
float4 temp0, temp1;
float addr0;
float3 temp2;
float2 temp3;
// def c0, 0.1591549, 0.5, 6.283185, -3.141593
// def c1, 0.002047857, 0.001433974, -0.002047857, 4
// def c2, 0.5, -0.5, 0, 0
// def c3, 1, 0, 0.001433974, 0
// def c4, 1, -1, 0, 0
// def c5, -1.550099E-06, -2.170139E-05, 0.002604167, 0.0002604167
// def c6, -0.02083333, -0.125, 1, 0.5
// defi i0, 3, 0, 0, 0
// dcl_position v0
// mad r0.xyz, v0.xyxw, c3.xxyw, c3.yyxw
temp0.xyz = position.xyx * float3(1, 1, 0) + float3(0, 0, 1);
// dp3 r0.w, r0, c29.xyww
temp0.w = dot(temp0.xyz, (World._m02_m12_m22_m32).xyw);
// dp3 r1.x, r0, c27.xyww
temp1.x = dot(temp0.xyz, (World._m00_m10_m20_m30).xyw);
// dp3 r1.y, r0, c28.xyww
temp1.y = dot(temp0.xyz, (World._m01_m11_m21_m31).xyw);
// mul r0.xyz, r1.y, c1
temp0.xyz = temp1.yyy * float3(0.002047857, 0.001433974, -0.002047857);
// mad oT0.yw, r1.x, c1.xzzx, r0.y
o.texcoord.yw = temp1.xx * float2(-0.002047857, 0.002047857) + temp0.yy;
// mad r0.xy, r1.x, c3.z, r0.xzzw
temp0.xy = temp1.xx * float2(0.001433974, 0.001433974) + temp0.xz;
// add oT0.x, r0.x, c23.x
o.texcoord.x = temp0.x + expr23.x;
// add oT0.z, r0.y, c25.x
o.texcoord.z = temp0.y + expr25.x;
// mov r1.z, r0.w
temp1.z = temp0.w;
// mov r0.xy, c3.y
temp0.xy = float2(0, 0);
// rep i0
for (int it0 = 0; it0 < int1(3); ++it0) {
// mul r0.z, r0.y, c1.w
temp0.z = temp0.y * float1(4);
// mova a0.x, r0.z
addr0.x = temp0.z;
// mov r2.x, c33.x
temp2.x = Time.x;
// mul r0.z, r2.x, c13[a0.x].x
temp0.z = temp2.x * wave[0 + (addr0.x / 4)].phase.x;
// mov r2.x, c12[a0.x].x
temp2.x = wave[0 + (addr0.x / 4)].amplitude.x;
// mul r2.x, r2.x, c31.x
temp2.x = temp2.x * WaveAmplitude.x;
// mul r2.yz, r1.xxyw, c14[a0.x].xxyw
temp2.yz = temp1.xy * wave[0 + (addr0.x / 4)].direction.xy;
// add r2.y, r2.z, r2.y
temp2.y = temp2.z + temp2.y;
// mul r2.y, r2.y, c11[a0.x].x
temp2.y = temp2.y * wave[0 + (addr0.x / 4)].frequency.x;
// mad r0.z, r2.y, c32.x, r0.z
temp0.z = temp2.y * WaveFrequency.x + temp0.z;
// mad r0.z, r0.z, c0.x, c0.y
temp0.z = temp0.z * float1(0.15915494) + float1(0.5);
// frc r0.z, r0.z
temp0.z = frac(temp0.z);
// mad r0.z, r0.z, c0.z, c0.w
temp0.z = temp0.z * float1(6.2831855) + float1(-3.1415927);
// sincos r3.xy, r0.z, c5, c6
temp3.xy = float2(cos(temp0.z), sin(temp0.z));
// mad r0.x, r2.x, r3.x, r0.x
temp0.x = temp2.x * temp3.x + temp0.x;
// mul r0.z, r2.x, r3.y
temp0.z = temp2.x * temp3.y;
// max r0.z, r0.z, c3.y
temp0.z = max(temp0.z, float1(0));
// add r1.z, r1.z, r0.z
temp1.z = temp1.z + temp0.z;
// add r0.y, r0.y, c3.x
temp0.y = temp0.y + float1(1);
// endrep
}
// mov oT1.w, r0.x
o.texcoord1.w = temp0.x;
// add r0.xyz, -r1, c123
temp0.xyz = -temp1.xyz + EyePosition.xyz;
// dp3 r0.w, r0, r0
temp0.w = dot(temp0.xyz, temp0.xyz);
// rsq r0.w, r0.w
temp0.w = 1 / sqrt(temp0.w);
// mul oT1.xyz, r0, r0.w
o.texcoord1.xyz = temp0.xyz * temp0.www;
// add r0.xy, r1, c30.zwzw
temp0.xy = temp1.xy + Shroud.ScaleUV_OffsetUV.zw;
// mul oT3.xy, r0, c30
o.texcoord3 = temp0 * Shroud.ScaleUV_OffsetUV;
// mov r1.w, c3.x
temp1.w = float1(1);
// dp4 r0.z, r1, c122
temp0.z = dot(temp1, (ViewProjection._m03_m13_m23_m33));
// dp4 r0.x, r1, c119
temp0.x = dot(temp1, (ViewProjection._m00_m10_m20_m30));
// dp4 r0.y, r1, c120
temp0.y = dot(temp1, (ViewProjection._m01_m11_m21_m31));
// mov oPos.xyw, r0.xyzz
o.position.xyw = temp0.xyz;
// dp4 oPos.z, r1, c121
o.position.z = dot(temp1, (ViewProjection._m02_m12_m22_m32));
// rcp r0.z, r0.z
temp0.z = 1.0f / temp0.z;
// mul r0.xy, r0, r0.z
temp0.xy = temp0.xy * temp0.zz;
// mad oT2.zw, r0.xyxy, c2.xyxy, c2.x
o.texcoord2.zw = temp0.xy * float2(0.5, -0.5) + float2(0.5, 0.5);
// mov oD0, c26
o.color = expr26;
// mad oT2.xy, v0, c4, c4.zxzw
o.texcoord2.xy = position.xy * float2(1, -1) + float2(0, 1);
//
return o;
}
// Default_Expression7 Expression_2_0 Has PRES False
float Default_Expression7()
{
float1 expr0;
// mov c0.x, c0.x
expr0.x = HasShadow.x;
return expr0;
}
// Default_VertexShader8 Vertex_3_0 Has PRES True
struct Default_VertexShader8_Output
{
float4 position : POSITION;
float4 color : COLOR;
float4 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
float4 texcoord2 : TEXCOORD2;
float4 texcoord3 : TEXCOORD3;
float4 texcoord4 : TEXCOORD4;
float2 texcoord5 : TEXCOORD5;
};
Default_VertexShader8_Output Default_VertexShader8(float4 position : POSITION)
{
/*
PRSI
OutputRegisterOffset: 23
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 9
Unknown3: 0
Unknown4: 0
Unknown5: 23
Unknown6: 4
Mappings: 2
0 - ConstOutput: 28 ConstInput 4
1 - ConstOutput: 0 ConstInput 0
*/
float4 expr23;
float4 expr24;
float4 expr25;
float4 expr26;
float4 expr27;
float4 expr28;
float4 expr29;
float4 expr30;
float4 expr31;
{
float4 temp0;
float4 temp1;
// Expression_2_1
// mul c23.x, c3.x, (0.005)
expr23.x = Foam1Scalar.x * (0.005);
// mul c24.x, c4.x, (0.004)
expr24.x = Foam2Scalar.x * (0.004);
// mul r0.x, c5.x, c8.x
temp0.x = FoamSpeed.x * Time.x;
// mul c25.x, r0.x, (0.011)
expr25.x = temp0.x * (0.011);
// mul r0.x, c6.x, c8.x
temp0.x = OctaveSpeed.x * Time.x;
// mul r1.x, r0.x, (0.015)
temp1.x = temp0.x * (0.015);
// mul r0.x, r1.x, c7.x
temp0.x = temp1.x * OctaveDivergenceSpeed.x;
// add c26.x, r1.x, r0.x
expr26.x = temp1.x + temp0.x;
// neg r1.y, r0.x
temp1.y = -temp0.x;
// add c28.x, r1.x, r1.y
expr28.x = temp1.x + temp1.y;
// add c29.x, c1.x, c2.x
expr29.x = FoamHeight.x + FoamBlend.x;
// rcp c30.x, c2.x
expr30.x = 1.0f / (FoamBlend.x);
// mov c31.xyz, c0.xyz
expr31.xyz = MaterialColorDiffuse.xyz;
// mov c31.w, (1)
expr31.w = (1);
}
Default_VertexShader8_Output o;
float4 temp0, temp1, temp2;
float addr0;
float3 temp3;
float2 temp4;
// def c0, 0.002047857, 0.001433974, -0.002047857, 4
// def c1, 0.1591549, 0.5, 6.283185, -3.141593
// def c2, 1, 0, 0.001433974, 0
// def c3, 0.5, -0.5, 0, -0.0015
// def c4, 1, -1, 0, 0
// defi i0, 3, 0, 0, 0
// dcl_position v0
// dcl_position o0
// dcl_color o1
// dcl_texcoord o2
// dcl_texcoord1 o3
// dcl_texcoord2 o4
// dcl_texcoord3 o5
// dcl_texcoord4 o6
// dcl_texcoord5 o7.xy
// mad r0.xyz, v0.xyxw, c2.xxyw, c2.yyxw
temp0.xyz = position.xyx * float3(1, 1, 0) + float3(0, 0, 1);
// dp3 r1.x, r0, c32.xyww
temp1.x = dot(temp0.xyz, (World._m00_m10_m20_m30).xyw);
// dp3 r1.y, r0, c33.xyww
temp1.y = dot(temp0.xyz, (World._m01_m11_m21_m31).xyw);
// dp3 r0.x, r0, c34.xyww
temp0.x = dot(temp0.xyz, (World._m02_m12_m22_m32).xyw);
// mul r0.y, r1.y, c23.x
temp0.y = temp1.y * expr23.x;
// mul r0.z, r1.y, c24.x
temp0.z = temp1.y * expr24.x;
// mov r2.x, c23.x
temp2.x = expr23.x;
// mad o2.x, r1.x, r2.x, c25.x
o.texcoord.x = temp1.x * temp2.x + expr25.x;
// mov r2.x, c24.x
temp2.x = expr24.x;
// mad o2.z, r1.x, r2.x, -c25.x
o.texcoord.z = temp1.x * temp2.x + -expr25.x;
// mul r2, r1.y, c0.xyzy
temp2 = temp1.y * float4(0.002047857, 0.001433974, -0.002047857, 0.001433974);
// mad r2.xz, r1.x, c2.z, r2
temp2.xz = temp1.xx * float2(0.001433974, 0.001433974) + temp2.xz;
// add o3.x, r2.x, c26.x
o.texcoord1.x = temp2.x + expr26.x;
// mad o3.yw, r1.x, c0.xzzx, r2
o.texcoord1.yw = temp1.xx * float2(-0.002047857, 0.002047857) + temp2.yw;
// add o3.z, r2.z, c28.x
o.texcoord1.z = temp2.z + expr28.x;
// mov r1.z, r0.x
temp1.z = temp0.x;
// mov r0.w, c2.y
temp0.w = float1(0);
// rep i0
for (int it0 = 0; it0 < int1(3); ++it0) {
// mul r2.x, r0.w, c0.w
temp2.x = temp0.w * float1(4);
// mova a0.x, r2.x
addr0.x = temp2.x;
// mov r2.x, c12[a0.x].x
temp2.x = wave[0 + (addr0.x / 4)].amplitude.x;
// mul r2.x, r2.x, c36.x
temp2.x = temp2.x * WaveAmplitude.x;
// mul r2.yz, r1.xxyw, c14[a0.x].xxyw
temp2.yz = temp1.xy * wave[0 + (addr0.x / 4)].direction.xy;
// add r2.y, r2.z, r2.y
temp2.y = temp2.z + temp2.y;
// mul r2.y, r2.y, c11[a0.x].x
temp2.y = temp2.y * wave[0 + (addr0.x / 4)].frequency.x;
// mov r3.x, c38.x
temp3.x = Time.x;
// mul r2.z, r3.x, c13[a0.x].x
temp2.z = temp3.x * wave[0 + (addr0.x / 4)].phase.x;
// mad r2.y, r2.y, c37.x, r2.z
temp2.y = temp2.y * WaveFrequency.x + temp2.z;
// mad r2.y, r2.y, c1.x, c1.y
temp2.y = temp2.y * float1(0.15915494) + float1(0.5);
// frc r2.y, r2.y
temp2.y = frac(temp2.y);
// mad r2.y, r2.y, c1.z, c1.w
temp2.y = temp2.y * float1(6.2831855) + float1(-3.1415927);
// sincos r3.y, r2.y
temp3.y = sin(temp2.y);
// mul r2.x, r2.x, r3.y
temp2.x = temp2.x * temp3.y;
// max r2.x, r2.x, c2.y
temp2.x = max(temp2.x, float1(0));
// add r1.z, r1.z, r2.x
temp1.z = temp1.z + temp2.x;
// add r0.w, r0.w, c2.x
temp0.w = temp0.w + float1(1);
// endrep
}
// add r0.x, -r0.x, r1.z
temp0.x = -temp0.x + temp1.z;
// slt r0.w, c29.x, r0.x
temp0.w = (expr29.x < temp0.x) ? 1 : 0;
// add r0.x, r0.x, -c29.x
temp0.x = temp0.x + -expr29.x;
// mul r0.x, r0.x, c30.x
temp0.x = temp0.x * expr30.x;
// mul o5.w, r0.w, r0.x
o.texcoord3.w = temp0.w * temp0.x;
// mov r1.w, c2.x
temp1.w = float1(1);
// dp4 r2.x, r1, c119
temp2.x = dot(temp1, (ViewProjection._m00_m10_m20_m30));
// dp4 r2.y, r1, c120
temp2.y = dot(temp1, (ViewProjection._m01_m11_m21_m31));
// dp4 o0.z, r1, c121
o.position.z = dot(temp1, (ViewProjection._m02_m12_m22_m32));
// dp4 r2.z, r1, c122
temp2.z = dot(temp1, (ViewProjection._m03_m13_m23_m33));
// dp4 r3.x, r1, c113
temp3.x = dot(temp1, (ShadowMapWorldToShadow._m00_m10_m20_m30));
// dp4 r3.y, r1, c114
temp3.y = dot(temp1, (ShadowMapWorldToShadow._m01_m11_m21_m31));
// dp4 r3.z, r1, c115
temp3.z = dot(temp1, (ShadowMapWorldToShadow._m02_m12_m22_m32));
// dp4 r0.x, r1, c116
temp0.x = dot(temp1, (ShadowMapWorldToShadow._m03_m13_m23_m33));
// rcp r0.w, r0.x
temp0.w = 1.0f / temp0.x;
// rcp r1.w, r2.z
temp1.w = 1.0f / temp2.z;
// mul r4.xy, r2, r1.w
temp4.xy = temp2.xy * temp1.ww;
// mad o6.zw, r4.xyxy, c3.xyxy, c3.x
o.texcoord4.zw = temp4.xy * float2(0.5, -0.5) + float2(0.5, 0.5);
// add r4.xy, r1, c35.zwzw
temp4.xy = temp1.xy + Shroud.ScaleUV_OffsetUV.zw;
// mul o7.xy, r4, c35
o.texcoord5 = temp4 * Shroud.ScaleUV_OffsetUV;
// mov o0.xyw, r2.xyzz
o.position.xyw = temp2.xyz;
// mov o1, c31
o.color = expr31;
// mov o2.yw, r0.xyzz
o.texcoord.yw = temp0.yz;
// mad o4.xyz, r3, r0.w, c3.zzww
o.texcoord2.xyz = temp3.xyz * temp0.www + float3(0, 0, -0.0015);
// mov o4.w, r0.x
o.texcoord2.w = temp0.x;
// mov o5.xyz, r1
o.texcoord3.xyz = temp1.xyz;
// mad o6.xy, v0, c4, c4.zxzw
o.texcoord4.xy = position.xy * float2(1, -1) + float2(0, 1);
//
return o;
}
technique Default
{
pass P0
{
VertexShader = compile vs_3_0 Default_VertexShader8(); // 87
PixelShader = PS_WaterShadowMap_Array[Default_Expression7()]; // 88
AlphaBlendEnable = 0;
ZEnable = 1;
ZFunc = 4;
ZWriteEnable = 0;
CullMode = 2;
AlphaTestEnable = 0;
}
}
technique Default_M
{
pass P0
{
VertexShader = compile vs_2_0 Default_M_VertexShader6(); // 89
PixelShader = compile ps_2_0 Default_M_PixelShader5(); // 90
ZEnable = 1;
ZFunc = 4;
ZWriteEnable = 0;
CullMode = 2;
AlphaTestEnable = 0;
AlphaBlendEnable = 0;
}
}
technique Default_L
{
pass P0
{
VertexShader = compile vs_2_0 Default_L_VertexShader4(); // 91
PixelShader = compile ps_2_0 Default_L_PixelShader3(); // 92
ZEnable = 1;
ZFunc = 4;
ZWriteEnable = 0;
CullMode = 2;
AlphaTestEnable = 0;
AlphaBlendEnable = 1;
}
}