287 lines
8.6 KiB
HLSL
287 lines
8.6 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 };
|
|
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;>;
|
|
column_major float4x4 ViewProjection : register(vs_2_0, c119) <bool unmanaged = 1;>;
|
|
float4 WorldBones[128] <bool unmanaged = 1;>;
|
|
struct {
|
|
float4 VideoTex_NumPerRow_LastFrame_SingleRow_isRand;
|
|
float4 ColorAnimationFunctions[6];
|
|
float4 TimeKeys;
|
|
int ShaderType;
|
|
float SpeedMultiplier;
|
|
float2 ColorScaleRange;
|
|
} Draw <string UIWidget = "None"; string SasBindAddress = "Particle.Draw";> = { 4, 15, -1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, -0.1, 0.2 };
|
|
struct {
|
|
float3 Gravity;
|
|
float3 DriftVelocity;
|
|
float2 VelocityDampingRange;
|
|
} Physics <string UIWidget = "None"; string SasBindAddress = "Particle.Physics";> = { 0, 0, 0, 0, 0, 0, 1, 0 };
|
|
struct {
|
|
float3 Size_Rate_Damping__Min;
|
|
float3 Size_Rate_Damping__Spread;
|
|
float3 XYRotation_Rate_Damping__Min;
|
|
float3 XYRotation_Rate_Damping__Spread;
|
|
float3 ZRotation_Rate_Damping__Min;
|
|
float3 ZRotation_Rate_Damping__Spread;
|
|
} Update <string UIWidget = "None"; string SasBindAddress = "Particle.Update";> = { 0, 0, 1, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 };
|
|
texture DiffuseTexture <string UIWidget = "None"; string SasBindAddress = "Particle.Draw.Texture";>; // 8
|
|
sampler2D DiffuseTextureSampler : register(ps_2_0, s0) <string Texture = "DiffuseTexture"; string UIWidget = "None"; string SasBindAddress = "Particle.Draw.Texture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <DiffuseTexture>; // 11
|
|
MinFilter = 2;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
};
|
|
struct
|
|
{
|
|
float4 ScaleUV_OffsetUV;
|
|
} Shroud : register(vs_2_0, c11) <string UIWidget = "None"; string SasBindAddress = "Terrain.Shroud";> = { 1, 1, 0, 0 };
|
|
texture ShroudTexture <string UIWidget = "None"; string SasBindAddress = "Terrain.Shroud.Texture"; string ResourceName = "ShaderPreviewShroud.dds";>; // 17
|
|
sampler2D ShroudTextureSampler : register(ps_2_0, s1) <string Texture = "ShroudTexture"; string UIWidget = "None"; string SasBindAddress = "Terrain.Shroud.Texture"; string ResourceName = "ShaderPreviewShroud.dds";> =
|
|
sampler_state
|
|
{
|
|
Texture = <ShroudTexture>; // 21
|
|
MinFilter = 2;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
};
|
|
// PS_Array_Shader_0 Pixel_2_0 Has PRES False
|
|
struct PS_Array_Shader_0_Input
|
|
{
|
|
float4 color : COLOR;
|
|
float2 texcoord : TEXCOORD;
|
|
float2 texcoord1 : TEXCOORD1;
|
|
};
|
|
|
|
float4 PS_Array_Shader_0(PS_Array_Shader_0_Input i) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0, temp1;
|
|
float4 temp2;
|
|
// def c0, -0.75, 0, 0, 0
|
|
// dcl v0
|
|
// dcl t0.xy
|
|
// dcl t1.xy
|
|
// dcl_2d s0
|
|
// dcl_2d s1
|
|
// texld r0, t1, s1
|
|
temp0 = tex2D(ShroudTextureSampler, i.texcoord1.xy);
|
|
// texld r1, t0, s0
|
|
temp1 = tex2D(DiffuseTextureSampler, i.texcoord.xy);
|
|
// add r0.x, r0.x, c0.x
|
|
temp0.x = temp0.x + float1(-0.75);
|
|
// add r0.x, r0.x, r0.x
|
|
temp0.x = temp0.x + temp0.x;
|
|
// max r2.w, r0.x, c0.y
|
|
temp2.w = max(temp0.x, float1(0));
|
|
// add r0.x, r2.w, r2.w
|
|
temp0.x = temp2.w + temp2.w;
|
|
// mul r1, r1, v0
|
|
temp1 = temp1 * i.color;
|
|
// mul r1.xyz, r0.x, r1
|
|
temp1.xyz = temp0.xxx * temp1.xyz;
|
|
// mov oC0, r1
|
|
out_color = temp1;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// PS_Array_Shader_1 Pixel_2_0 Has PRES False
|
|
struct PS_Array_Shader_1_Input
|
|
{
|
|
float4 color : COLOR;
|
|
float3 color1 : COLOR1;
|
|
float2 texcoord : TEXCOORD;
|
|
float2 texcoord1 : TEXCOORD1;
|
|
};
|
|
|
|
float4 PS_Array_Shader_1(PS_Array_Shader_1_Input i) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0, temp1;
|
|
float4 temp2;
|
|
// def c0, -1, 1, -0.75, 0
|
|
// dcl v0
|
|
// dcl v1.xyz
|
|
// dcl t0.xy
|
|
// dcl t1.xy
|
|
// dcl_2d s0
|
|
// dcl_2d s1
|
|
// texld r0, t1, s1
|
|
temp0 = tex2D(ShroudTextureSampler, i.texcoord1.xy);
|
|
// texld r1, t0, s0
|
|
temp1 = tex2D(DiffuseTextureSampler, i.texcoord.xy);
|
|
// add r0.x, r0.x, c0.z
|
|
temp0.x = temp0.x + float1(-0.75);
|
|
// add r0.x, r0.x, r0.x
|
|
temp0.x = temp0.x + temp0.x;
|
|
// max r2.w, r0.x, c0.w
|
|
temp2.w = max(temp0.x, float1(0));
|
|
// add r0.x, r2.w, r2.w
|
|
temp0.x = temp2.w + temp2.w;
|
|
// mad r0.yzw, r1.wzyx, v0.wzyx, c0.x
|
|
temp0.yzw = temp1.zyx * i.color.zyx + float3(-1, -1, -1);
|
|
// mul r1.w, r1.w, v0.w
|
|
temp1.w = temp1.w * i.color.w;
|
|
// mad r0.yzw, v1.wzyx, r0, c0.y
|
|
temp0.yzw = i.color1.zyx * temp0.yzw + float3(1, 1, 1);
|
|
// mul r1.xyz, r0.x, r0.wzyx
|
|
temp1.xyz = temp0.xxx * temp0.wzy;
|
|
// mov oC0, r1
|
|
out_color = temp1;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// PS_Array_Shader_2 Pixel_2_0 Has PRES False
|
|
struct PS_Array_Shader_2_Input
|
|
{
|
|
float4 color : COLOR;
|
|
float3 color1 : COLOR1;
|
|
float2 texcoord : TEXCOORD;
|
|
float2 texcoord1 : TEXCOORD1;
|
|
};
|
|
|
|
float4 PS_Array_Shader_2(PS_Array_Shader_2_Input i) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0, temp1;
|
|
float4 temp2;
|
|
// def c0, -0.75, 0, 0, 0
|
|
// dcl v0
|
|
// dcl v1.xyz
|
|
// dcl t0.xy
|
|
// dcl t1.xy
|
|
// dcl_2d s0
|
|
// dcl_2d s1
|
|
// texld r0, t1, s1
|
|
temp0 = tex2D(ShroudTextureSampler, i.texcoord1.xy);
|
|
// texld r1, t0, s0
|
|
temp1 = tex2D(DiffuseTextureSampler, i.texcoord.xy);
|
|
// add r0.x, r0.x, c0.x
|
|
temp0.x = temp0.x + float1(-0.75);
|
|
// add r0.x, r0.x, r0.x
|
|
temp0.x = temp0.x + temp0.x;
|
|
// max r2.w, r0.x, c0.y
|
|
temp2.w = max(temp0.x, float1(0));
|
|
// add r0.x, r2.w, r2.w
|
|
temp0.x = temp2.w + temp2.w;
|
|
// mul r1, r1, v0
|
|
temp1 = temp1 * i.color;
|
|
// mul r0.yzw, r1.wzyx, v1.wzyx
|
|
temp0.yzw = temp1.zyx * i.color1.zyx;
|
|
// mul r1.xyz, r0.x, r0.wzyx
|
|
temp1.xyz = temp0.xxx * temp0.wzy;
|
|
// mov oC0, r1
|
|
out_color = temp1;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
PixelShader PS_Array[3] = {
|
|
compile ps_2_0 PS_Array_Shader_0(), // 26
|
|
compile ps_2_0 PS_Array_Shader_1(), // 27
|
|
compile ps_2_0 PS_Array_Shader_2(), // 28
|
|
};
|
|
// Default_Expression4 Expression_2_0 Has PRES False
|
|
float Default_Expression4()
|
|
{
|
|
float1 expr0;
|
|
// mov c0.x, (0)
|
|
expr0.x = (0);
|
|
return expr0;
|
|
}
|
|
|
|
// Default_VertexShader5 Vertex_2_0 Has PRES False
|
|
struct Default_VertexShader5_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 color : COLOR;
|
|
float4 texcoord : TEXCOORD;
|
|
};
|
|
|
|
struct Default_VertexShader5_Output
|
|
{
|
|
float4 position : POSITION;
|
|
float2 texcoord1 : TEXCOORD1;
|
|
float4 color : COLOR;
|
|
float3 color1 : COLOR1;
|
|
float2 texcoord : TEXCOORD;
|
|
};
|
|
|
|
Default_VertexShader5_Output Default_VertexShader5(Default_VertexShader5_Input i)
|
|
{
|
|
Default_VertexShader5_Output o;
|
|
float4 temp0;
|
|
// def c0, 1, 0, 0, 0
|
|
// dcl_position v0
|
|
// dcl_color v1
|
|
// dcl_texcoord v2
|
|
// mad r0, v0.xyzx, c0.xxxy, c0.yyyx
|
|
temp0 = i.position.xyzx * float4(1, 1, 1, 0) + float4(0, 0, 0, 1);
|
|
// 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 r0.xy, v0, c11.zwzw
|
|
temp0.xy = i.position.xy + Shroud.ScaleUV_OffsetUV.zw;
|
|
// mul oT1.xy, r0, c11
|
|
o.texcoord1 = temp0 * Shroud.ScaleUV_OffsetUV;
|
|
// mov oD0, v1
|
|
o.color = i.color;
|
|
// mov oD1.xyz, c0.x
|
|
o.color1 = float4(1, 1, 1, 1);
|
|
// mov oT0.xy, v2
|
|
o.texcoord = i.texcoord;
|
|
//
|
|
|
|
return o;
|
|
}
|
|
|
|
technique Default
|
|
{
|
|
pass pass0 <string ExpressionEvaluator = "Particle";>
|
|
{
|
|
VertexShader = compile vs_2_0 Default_VertexShader5(); // 30
|
|
PixelShader = PS_Array[Default_Expression4()]; // 31
|
|
ZEnable = 1;
|
|
ZWriteEnable = 0;
|
|
ZFunc = 4;
|
|
CullMode = 1;
|
|
AlphaBlendEnable = 1;
|
|
AlphaFunc = 7;
|
|
AlphaRef = 96;
|
|
}
|
|
}
|
|
|