204 lines
6.0 KiB
HLSL
204 lines
6.0 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;>;
|
|
row_major float4x4 ViewProjection <bool unmanaged = 1;>;
|
|
float4 WorldBones[128] <bool unmanaged = 1;>;
|
|
float4 FlatColorOverride <string UIWidget = "None"; string SasBindAddress = "WW3D.FlatColor"; int WW3DDynamicSet = 2;>;
|
|
texture BaseTexture <string UIName = "Base Texture";>; // 4
|
|
sampler2D BaseTextureSampler : register(ps_2_0, s0) <string Texture = "BaseTexture"; string UIName = "Base Texture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <BaseTexture>; // 6
|
|
MinFilter = 2;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
};
|
|
column_major float4x4 WorldViewProjection : WorldViewProjection : register(vs_2_0, c11);
|
|
// Textured_PixelShader1 Pixel_2_0 Has PRES False
|
|
float4 Textured_PixelShader1(float2 texcoord : TEXCOORD) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0;
|
|
// dcl t0.xy
|
|
// dcl_2d s0
|
|
// texld r0, t0, s0
|
|
temp0 = tex2D(BaseTextureSampler, texcoord.xy);
|
|
// mov oC0, r0
|
|
out_color = temp0;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// Textured_VertexShader2 Vertex_2_0 Has PRES False
|
|
struct Textured_VertexShader2_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
};
|
|
|
|
struct Textured_VertexShader2_Output
|
|
{
|
|
float4 position : POSITION;
|
|
float2 texcoord : TEXCOORD;
|
|
};
|
|
|
|
Textured_VertexShader2_Output Textured_VertexShader2(Textured_VertexShader2_Input i)
|
|
{
|
|
Textured_VertexShader2_Output o;
|
|
float4 temp0;
|
|
// def c0, 1, 0, 0, 0
|
|
// dcl_position v0
|
|
// dcl_texcoord v1
|
|
// 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, c11
|
|
o.position.x = dot(temp0, (WorldViewProjection._m00_m10_m20_m30));
|
|
// dp4 oPos.y, r0, c12
|
|
o.position.y = dot(temp0, (WorldViewProjection._m01_m11_m21_m31));
|
|
// dp4 oPos.z, r0, c13
|
|
o.position.z = dot(temp0, (WorldViewProjection._m02_m12_m22_m32));
|
|
// dp4 oPos.w, r0, c14
|
|
o.position.w = dot(temp0, (WorldViewProjection._m03_m13_m23_m33));
|
|
// mov oT0.xy, v1
|
|
o.texcoord = i.texcoord;
|
|
//
|
|
|
|
return o;
|
|
}
|
|
|
|
// DynamicParameter_PixelShader3 Pixel_2_0 Has PRES False
|
|
float4 DynamicParameter_PixelShader3() : COLOR
|
|
{
|
|
float4 out_color;
|
|
// def c0, 1, 0, 0, 1
|
|
// mov oC0, c0
|
|
out_color = float4(1, 0, 0, 1);
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// DynamicParameter_VertexShader4 Vertex_2_0 Has PRES False
|
|
float4 DynamicParameter_VertexShader4(float4 position : POSITION) : POSITION
|
|
{
|
|
float4 out_position;
|
|
float4 temp0;
|
|
// def c0, 1, 0, 0, 0
|
|
// dcl_position v0
|
|
// mad r0, v0.xyzx, c0.xxxy, c0.yyyx
|
|
temp0 = position.xyzx * float4(1, 1, 1, 0) + float4(0, 0, 0, 1);
|
|
// dp4 oPos.x, r0, c11
|
|
out_position.x = dot(temp0, (WorldViewProjection._m00_m10_m20_m30));
|
|
// dp4 oPos.y, r0, c12
|
|
out_position.y = dot(temp0, (WorldViewProjection._m01_m11_m21_m31));
|
|
// dp4 oPos.z, r0, c13
|
|
out_position.z = dot(temp0, (WorldViewProjection._m02_m12_m22_m32));
|
|
// dp4 oPos.w, r0, c14
|
|
out_position.w = dot(temp0, (WorldViewProjection._m03_m13_m23_m33));
|
|
//
|
|
|
|
return out_position;
|
|
}
|
|
|
|
// Simplest_PixelShader5 Pixel_2_0 Has PRES False
|
|
float4 Simplest_PixelShader5() : COLOR
|
|
{
|
|
float4 out_color;
|
|
// def c0, 1, 0, 0, 1
|
|
// mov oC0, c0
|
|
out_color = float4(1, 0, 0, 1);
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// Simplest_VertexShader6 Vertex_2_0 Has PRES False
|
|
float4 Simplest_VertexShader6(float4 position : POSITION) : POSITION
|
|
{
|
|
float4 out_position;
|
|
float4 temp0;
|
|
// def c0, 1, 0, 0, 0
|
|
// dcl_position v0
|
|
// mad r0, v0.xyzx, c0.xxxy, c0.yyyx
|
|
temp0 = position.xyzx * float4(1, 1, 1, 0) + float4(0, 0, 0, 1);
|
|
// dp4 oPos.x, r0, c11
|
|
out_position.x = dot(temp0, (WorldViewProjection._m00_m10_m20_m30));
|
|
// dp4 oPos.y, r0, c12
|
|
out_position.y = dot(temp0, (WorldViewProjection._m01_m11_m21_m31));
|
|
// dp4 oPos.z, r0, c13
|
|
out_position.z = dot(temp0, (WorldViewProjection._m02_m12_m22_m32));
|
|
// dp4 oPos.w, r0, c14
|
|
out_position.w = dot(temp0, (WorldViewProjection._m03_m13_m23_m33));
|
|
//
|
|
|
|
return out_position;
|
|
}
|
|
|
|
technique Simplest
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 Simplest_VertexShader6(); // 9
|
|
PixelShader = compile ps_2_0 Simplest_PixelShader5(); // 10
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
AlphaBlendEnable = 0;
|
|
ColorWriteEnable = 15;
|
|
AlphaTestEnable = 0;
|
|
}
|
|
}
|
|
|
|
technique DynamicParameter
|
|
{
|
|
pass P0 <string ExpressionEvaluator = "Simplest";>
|
|
{
|
|
VertexShader = compile vs_2_0 DynamicParameter_VertexShader4(); // 12
|
|
PixelShader = compile ps_2_0 DynamicParameter_PixelShader3(); // 13
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
SrcBlend = 2;
|
|
DestBlend = 2;
|
|
ColorWriteEnable = 15;
|
|
AlphaTestEnable = 0;
|
|
}
|
|
}
|
|
|
|
technique Textured
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 Textured_VertexShader2(); // 14
|
|
PixelShader = compile ps_2_0 Textured_PixelShader1(); // 15
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
AlphaBlendEnable = 0;
|
|
ColorWriteEnable = 15;
|
|
AlphaTestEnable = 0;
|
|
}
|
|
}
|
|
|