369 lines
13 KiB
HLSL
369 lines
13 KiB
HLSL
string DefaultParameterScopeBlock = "material"; // 1
|
|
float3 AmbientLightColor <bool unmanaged = 1;> = { 0.3, 0.3, 0.3 };
|
|
struct {
|
|
float3 Color;
|
|
float3 Direction;
|
|
} DirectionalLight[3] <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 };
|
|
bool HasRecolorColors <string UIWidget = "None"; string SasBindAddress = "WW3D.HasRecolorColors"; bool ExportValue = 0;>;
|
|
float3 RecolorColor : register(ps_2_0, c0) <bool unmanaged = 1;>;
|
|
row_major float4x4 ShadowMapWorldToShadow <bool unmanaged = 1;>;
|
|
float OpacityOverride : register(vs_2_0, c1) <bool unmanaged = 1;> = { 1 };
|
|
float3 TintColor <bool unmanaged = 1;> = { 1, 1, 1 };
|
|
float3 EyePosition <bool unmanaged = 1;>;
|
|
column_major float4x4 ViewProjection : register(vs_2_0, c119) <bool unmanaged = 1;>;
|
|
float4 WorldBones[128] <bool unmanaged = 1;>;
|
|
int NumJointsPerVertex <string UIWidget = "None"; string SasBindAddress = "Sas.Skeleton.NumJointsPerVertex";>;
|
|
column_major float4x3 World : World : register(vs_2_0, c124);
|
|
float Time : Time;
|
|
texture Texture_0 <string UIName = "Diffuse Texture";>; // 6
|
|
sampler2D Texture_0Sampler : register(ps_2_0, s0) <string Texture = "Texture_0"; string UIName = "Diffuse Texture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <Texture_0>; // 8
|
|
MinFilter = 3;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
AddressU = 1;
|
|
AddressV = 1;
|
|
};
|
|
float3 ColorDiffuse : register(vs_2_0, c18) <string UIName = "Diffuse Material Color"; string UIWidget = "Color";> = { 1, 1, 1 };
|
|
float EmissiveHDRMultipler : register(ps_2_0, c11) <string UIName = "Emissive HDR Multiplier"; string UIWidget = "Slider"; float UIMax = 200;> = { 1 };
|
|
bool MultiTextureEnable : register(ps_2_0, c12) <string UIName = "Multi-Texture Enable";>;
|
|
float4 DiffuseCoordOffset : register(vs_2_0, c19) <string UIName = "Diffuse Coord Offset/Scale"; string UIWidget = "Slider"; float UIMax = 1; float UIMin = 0; float UIStep = 0.001;> = { 0, 0, 1, 1 };
|
|
texture Texture_1 <string UIName = "Displace Texture";>; // 18
|
|
sampler2D Texture_1Sampler : register(ps_2_0, s1) <string Texture = "Texture_1"; string UIName = "Displace Texture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <Texture_1>; // 20
|
|
MinFilter = 3;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
AddressU = 1;
|
|
AddressV = 1;
|
|
};
|
|
bool UniqueWorldCoordEnable <string UIName = "Unique World Coords Enable";>;
|
|
float UniqueWorldCoordScalar : register(vs_2_0, c20) <string UIName = "Unique World Coords Scale"; string UIWidget = "Slider"; float UIMax = 1; float UIMin = 0; float UIStep = 0.001;> = { 0.01 };
|
|
float UniqueWorldCoordStrength : register(vs_2_0, c21) <string UIName = "Unique World Coords Strength"; string UIWidget = "Slider"; float UIMax = 1; float UIMin = 0; float UIStep = 0.01;> = { 1 };
|
|
float DisplaceScalar : register(vs_2_0, c22) <string UIName = "Displace Scale"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = 0; float UIStep = 0.01;> = { 1 };
|
|
float DisplaceAmp : register(ps_2_0, c13) <string UIName = "Displace Amplitude"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = 0; float UIStep = 0.01;> = { 1 };
|
|
float DisplaceDivergenceAngle <string UIName = "Displace Divergence Angle"; string UIWidget = "Slider"; float UIMax = 180; float UIMin = 0; float UIStep = 0.5;>;
|
|
float DisplaceSpeed <string UIName = "Displace Speed"; string UIWidget = "Slider"; float UIMax = 50; float UIMin = 0; float UIStep = 0.01;> = { 1 };
|
|
texture Texture_2 <string UIName = "Mask Texture";>; // 36
|
|
sampler2D Texture_2Sampler : register(ps_2_0, s2) <string Texture = "Texture_2"; string UIName = "Mask Texture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <Texture_2>; // 38
|
|
MinFilter = 3;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
};
|
|
bool UseRecolorColors : register(ps_2_0, c14) <string UIName = "Allow House Color";>;
|
|
bool CullingEnable <string UIName = "Culling Enable";> = { 1 };
|
|
// Default_Expression1 Expression_2_0 Has PRES False
|
|
float Default_Expression1()
|
|
{
|
|
float1 expr0;
|
|
// add c0.x, c0.x, (1)
|
|
expr0.x = CullingEnable.x + (1);
|
|
return expr0;
|
|
}
|
|
|
|
// Default_PixelShader2 Pixel_2_0 Has PRES False
|
|
struct Default_PixelShader2_Input
|
|
{
|
|
float4 texcoord : TEXCOORD;
|
|
float4 texcoord1 : TEXCOORD1;
|
|
float4 texcoord2 : TEXCOORD2;
|
|
float texcoord3 : TEXCOORD3;
|
|
float texcoord4 : TEXCOORD4;
|
|
};
|
|
|
|
float4 Default_PixelShader2(Default_PixelShader2_Input i) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0, temp1, temp2;
|
|
float3 temp3;
|
|
// def c1, -1, 2.2, 1, 0.35
|
|
// dcl t0
|
|
// dcl t1
|
|
// dcl t2
|
|
// dcl t3.x
|
|
// dcl t4.x
|
|
// dcl_2d s0
|
|
// dcl_2d s1
|
|
// dcl_2d s2
|
|
// mov r0.x, t2.z
|
|
temp0.x = i.texcoord2.z;
|
|
// mov r0.y, t2.w
|
|
temp0.y = i.texcoord2.w;
|
|
// texld r0, r0, s1
|
|
temp0 = tex2D(Texture_1Sampler, temp0.xy);
|
|
// texld r1, t2, s1
|
|
temp1 = tex2D(Texture_1Sampler, i.texcoord2.xy);
|
|
// add r2.yw, r0.y, r1.y
|
|
temp2.yw = temp0.y + temp1.y;
|
|
// add r2.xz, r0.x, r1.x
|
|
temp2.xz = temp0.x + temp1.x;
|
|
// add r0, r2, c1.x
|
|
temp0 = temp2 + float4(-1, -1, -1, -1);
|
|
// mad r0, r0, c13.x, t1
|
|
temp0 = temp0 * DisplaceAmp.x + i.texcoord1;
|
|
// mov r1.x, r0.z
|
|
temp1.x = temp0.z;
|
|
// mov r1.y, r0.w
|
|
temp1.y = temp0.w;
|
|
// mov r2.xy, t1
|
|
temp2.xy = i.texcoord1.xy;
|
|
// add r2.xy, r2, -t3.x
|
|
temp2.xy = temp2.xy + -i.texcoord3.xx;
|
|
// texld r0, r0, s0
|
|
temp0 = tex2D(Texture_0Sampler, temp0.xy);
|
|
// texld r1, r1, s0
|
|
temp1 = tex2D(Texture_0Sampler, temp1.xy);
|
|
// texld r2, r2, s2
|
|
temp2 = tex2D(Texture_2Sampler, temp2.xy);
|
|
// mul r1.xyz, r0, r1
|
|
temp1.xyz = temp0.xyz * temp1.xyz;
|
|
// cmp r0.xyz, -c12.x, r0, r1
|
|
temp0.xyz = (-MultiTextureEnable.xxx >= 0) ? temp0.xyz : temp1.xyz;
|
|
// 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, c1.y
|
|
temp0.xyz = temp1.xyz * float3(2.2, 2.2, 2.2);
|
|
// exp r1.x, r0.x
|
|
temp1.x = exp2(temp0.x);
|
|
// exp r1.y, r0.y
|
|
temp1.y = exp2(temp0.y);
|
|
// exp r1.z, r0.z
|
|
temp1.z = exp2(temp0.z);
|
|
// mul r0.xyz, t0, c11.x
|
|
temp0.xyz = i.texcoord.xyz * EmissiveHDRMultipler.xxx;
|
|
// mul r0.xyz, r0, t0.w
|
|
temp0.xyz = temp0.xyz * i.texcoord.www;
|
|
// mul r0.xyz, r1, r0
|
|
temp0.xyz = temp1.xyz * temp0.xyz;
|
|
// mov r1.zw, c1
|
|
temp1.zw = float2(1, 0.35);
|
|
// lrp r3.xyz, r1.w, r1.z, c0
|
|
temp3.xyz = lerp(RecolorColor.xyz, temp1.zzz, temp1.www);
|
|
// mul r1.xyz, r0, r3
|
|
temp1.xyz = temp0.xyz * temp3.xyz;
|
|
// cmp r0.xyz, -c14.x, r0, r1
|
|
temp0.xyz = (-UseRecolorColors.xxx >= 0) ? temp0.xyz : temp1.xyz;
|
|
// mul r0.xyz, r2, r0
|
|
temp0.xyz = temp2.xyz * temp0.xyz;
|
|
// add r0.xyz, r0, r0
|
|
temp0.xyz = temp0.xyz + temp0.xyz;
|
|
// mul r0.xyz, r0, t4.x
|
|
temp0.xyz = temp0.xyz * i.texcoord4.xxx;
|
|
// mov r0.w, c1.z
|
|
temp0.w = float1(1);
|
|
// mov oC0, r0
|
|
out_color = temp0;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// Default_VertexShader3 Vertex_2_0 Has PRES True
|
|
struct Default_VertexShader3_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
struct Default_VertexShader3_Output
|
|
{
|
|
float4 texcoord2 : TEXCOORD2;
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
float4 texcoord1 : TEXCOORD1;
|
|
float texcoord3 : TEXCOORD3;
|
|
float texcoord4 : TEXCOORD4;
|
|
};
|
|
|
|
Default_VertexShader3_Output Default_VertexShader3(Default_VertexShader3_Input i)
|
|
{
|
|
/*
|
|
PRSI
|
|
OutputRegisterOffset: 11
|
|
Unknown1: 0
|
|
Unknown2: 0
|
|
OutputRegisterCount: 7
|
|
Unknown3: 0
|
|
Unknown4: 0
|
|
Unknown5: 11
|
|
Unknown6: 5
|
|
Mappings: 2
|
|
0 - ConstOutput: 17 ConstInput 1
|
|
1 - ConstOutput: 0 ConstInput 0
|
|
|
|
*/
|
|
float4 expr11;
|
|
float4 expr12;
|
|
float4 expr13;
|
|
float4 expr14;
|
|
float4 expr15;
|
|
float4 expr16;
|
|
float4 expr17;
|
|
{
|
|
float4 temp0;
|
|
float4 temp1;
|
|
// Expression_2_1
|
|
// mul r0.x, c0.x, c5.x
|
|
temp0.x = Time.x * DisplaceSpeed.x;
|
|
// mul c14.x, r0.x, (0.01)
|
|
expr14.x = temp0.x * (0.01);
|
|
// add r0.x, c3.x, (-1)
|
|
temp0.x = UniqueWorldCoordEnable.x + (-1);
|
|
// mul r1.x, r0.x, r0.x
|
|
temp1.x = temp0.x * temp0.x;
|
|
// neg r0.x, r1.x
|
|
temp0.x = -temp1.x;
|
|
// ge c11.x, r0.x, r1.x
|
|
expr11.x = temp0.x >= temp1.x;
|
|
// mul r0.xy, c0.x, c2.xy
|
|
temp0.xy = Time.x * DiffuseCoordOffset.xy;
|
|
// frc c15.xy, r0.xy
|
|
expr15.xy = frac(temp0.xy);
|
|
// add r0.x, c1.x, (-1)
|
|
temp0.x = MultiTextureEnable.x + (-1);
|
|
// mul r1.x, r0.x, r0.x
|
|
temp1.x = temp0.x * temp0.x;
|
|
// neg r0.x, r1.x
|
|
temp0.x = -temp1.x;
|
|
// ge c17.x, r0.x, r1.x
|
|
expr17.x = temp0.x >= temp1.x;
|
|
// mul r0.x, c4.x, (0.0027777312217828493)
|
|
temp0.x = DisplaceDivergenceAngle.x * (0.0027777312217828493);
|
|
// add r1.x, r0.x, (0.5)
|
|
temp1.x = temp0.x + (0.5);
|
|
// frc r0.x, r1.x
|
|
temp0.x = frac(temp1.x);
|
|
// mul r1.x, r0.x, (6.283185307179586)
|
|
temp1.x = temp0.x * (6.283185307179586);
|
|
// add r0.x, r1.x, (-3.141592653589793)
|
|
temp0.x = temp1.x + (-3.141592653589793);
|
|
// cos r1.x, r0.x
|
|
temp1.x = cos(temp0.x);
|
|
// sin r1.y, r0.x
|
|
temp1.y = sin(temp0.x);
|
|
// mov c12.x, r1.y
|
|
expr12.x = temp1.y;
|
|
// mov c13.x, r1.x
|
|
expr13.x = temp1.x;
|
|
}
|
|
|
|
Default_VertexShader3_Output o;
|
|
float4 temp0, temp1, temp2;
|
|
// def c0, 1, 0, 0.01, -3
|
|
// dcl_position v0
|
|
// dcl_texcoord v1
|
|
// dcl_color v2
|
|
// mul r0.xy, v1, c22.x
|
|
temp0.xy = i.texcoord.xy * DisplaceScalar.xx;
|
|
// mad r1, v0.xyzx, c0.xxxy, c0.yyyx
|
|
temp1 = i.position.xyzx * float4(1, 1, 1, 0) + float4(0, 0, 0, 1);
|
|
// dp4 r2.x, r1, c124
|
|
temp2.x = dot(temp1, (World._m00_m10_m20_m30));
|
|
// dp4 r2.y, r1, c125
|
|
temp2.y = dot(temp1, (World._m01_m11_m21_m31));
|
|
// dp4 r2.z, r1, c126
|
|
temp2.z = dot(temp1, (World._m02_m12_m22_m32));
|
|
// mul r0.zw, r2.xyxy, c20.x
|
|
temp0.zw = temp2.xy * UniqueWorldCoordScalar.xx;
|
|
// mul r0.zw, r0, c21.x
|
|
temp0.zw = temp0.zw * UniqueWorldCoordStrength.xx;
|
|
// mad r0.zw, r0, c0.z, -r0.xyxy
|
|
temp0.zw = temp0.zw * float2(0.01, 0.01) + -temp0.xy;
|
|
// mad r0.xy, c11.x, r0.zwzw, r0
|
|
temp0.xy = expr11.xx * temp0.zw + temp0.xy;
|
|
// mul r0.zw, r0.xyxy, c13.x
|
|
temp0.zw = temp0.xy * expr13.xx;
|
|
// mad oT2.y, r0.x, -c12.x, r0.w
|
|
o.texcoord2.y = temp0.x * -expr12.x + temp0.w;
|
|
// mul r1.x, r0.y, c12.x
|
|
temp1.x = temp0.y * expr12.x;
|
|
// mad r1.x, r0.x, c13.x, r1.x
|
|
temp1.x = temp0.x * expr13.x + temp1.x;
|
|
// add oT2.x, r1.x, c14.x
|
|
o.texcoord2.x = temp1.x + expr14.x;
|
|
// mad oT2.w, r0.x, c12.x, r0.w
|
|
o.texcoord2.w = temp0.x * expr12.x + temp0.w;
|
|
// mad r0.x, r0.y, -c12.x, r0.z
|
|
temp0.x = temp0.y * -expr12.x + temp0.z;
|
|
// add oT2.z, r0.x, c14.x
|
|
o.texcoord2.z = temp0.x + expr14.x;
|
|
// mov r2.w, c0.x
|
|
temp2.w = float1(1);
|
|
// dp4 oPos.x, r2, c119
|
|
o.position.x = dot(temp2, (ViewProjection._m00_m10_m20_m30));
|
|
// dp4 oPos.y, r2, c120
|
|
o.position.y = dot(temp2, (ViewProjection._m01_m11_m21_m31));
|
|
// dp4 oPos.z, r2, c121
|
|
o.position.z = dot(temp2, (ViewProjection._m02_m12_m22_m32));
|
|
// dp4 oPos.w, r2, c122
|
|
o.position.w = dot(temp2, (ViewProjection._m03_m13_m23_m33));
|
|
// mov r0.xyw, c0
|
|
temp0.xyw = float3(1, 0, -3);
|
|
// mad r1, c18.xyzx, r0.xxxy, r0.yyyx
|
|
temp1 = ColorDiffuse.xyzx * temp0.xxxy + temp0.yyyx;
|
|
// mul oT0, r1, v2
|
|
o.texcoord = temp1 * i.color;
|
|
// mul r0.yz, v1.xxyw, c19.xzww
|
|
temp0.yz = i.texcoord.xy * DiffuseCoordOffset.zw;
|
|
// mov r1.zw, c19
|
|
temp1.zw = DiffuseCoordOffset.zw;
|
|
// mad r0.yz, r0, r1.xzww, -c15.xxyw
|
|
temp0.yz = temp0.yz * temp1.zw + -expr15.xy;
|
|
// mad r1.xy, v1, r1.zwzw, c15
|
|
temp1.xy = i.texcoord.xy * temp1.zw + expr15.xy;
|
|
// add r0.yz, r0, -r1.xxyw
|
|
temp0.yz = temp0.yz + -temp1.xy;
|
|
// mad oT1.zw, c17.x, r0.xyyz, r1.xyxy
|
|
o.texcoord1.zw = expr17.xx * temp0.yz + temp1.xy;
|
|
// mov oT1.xy, r1
|
|
o.texcoord1.xy = temp1.xy;
|
|
// mad oT3.x, c1.x, -r0.w, -r0.x
|
|
o.texcoord3 = OpacityOverride.x * -temp0.w + -temp0.x;
|
|
// mov oT4.x, c0.x
|
|
o.texcoord4 = float4(1, 1, 1, 1);
|
|
//
|
|
|
|
return o;
|
|
}
|
|
|
|
technique Default
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 Default_VertexShader3(); // 43
|
|
PixelShader = compile ps_2_0 Default_PixelShader2(); // 44
|
|
ZEnable = 1;
|
|
ZFunc = 4;
|
|
ZWriteEnable = 0;
|
|
AlphaBlendEnable = 1;
|
|
CullMode = Default_Expression1(); // 0
|
|
SrcBlend = 2;
|
|
DestBlend = 2;
|
|
}
|
|
}
|
|
|