183 lines
5.3 KiB
HLSL
183 lines
5.3 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;>;
|
|
float3 ColorEmissive <string UIName = "Emissive Material Color"; string UIWidget = "Color";> = { 1, 1, 1 };
|
|
texture Texture_0 <string UIName = "Base Texture";>; // 4
|
|
sampler2D Texture_0Sampler : register(ps_2_0, s0) <string Texture = "Texture_0"; string UIName = "Base Texture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <Texture_0>; // 6
|
|
MinFilter = 3;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
AddressU = 1;
|
|
AddressV = 1;
|
|
};
|
|
float4 TexCoordTransform_0 : register(vs_2_0, c17) <string UIName = "UV0 Scl/Move"; string UIWidget = "Spinner"; float UIMin = -100; float UIMax = 100;> = { 1, 1, 0, 0 };
|
|
bool DepthWriteEnable <string UIName = "Depth Write Enable";> = { 1 };
|
|
bool AlphaBlendingEnable <string UIName = "Alpha Blend Enable";>;
|
|
bool FogEnable <string UIName = "Fog Enable";> = { 1 };
|
|
column_major float4x4 WorldViewProjection : WorldViewProjection : register(vs_2_0, c11);
|
|
row_major float4x3 World : World;
|
|
float Time : Time;
|
|
// Default_Expression1 Expression_2_0 Has PRES False
|
|
float Default_Expression1()
|
|
{
|
|
float1 expr0;
|
|
// mov c0.x, c0.x
|
|
expr0.x = AlphaBlendingEnable.x;
|
|
return expr0;
|
|
}
|
|
|
|
// Default_Expression2 Expression_2_0 Has PRES False
|
|
float Default_Expression2()
|
|
{
|
|
float1 expr0;
|
|
// mov c0.x, c0.x
|
|
expr0.x = DepthWriteEnable.x;
|
|
return expr0;
|
|
}
|
|
|
|
// Default_PixelShader3 Pixel_2_0 Has PRES False
|
|
struct Default_PixelShader3_Input
|
|
{
|
|
float3 color : COLOR;
|
|
float color1 : COLOR1;
|
|
float2 texcoord : TEXCOORD;
|
|
};
|
|
|
|
float4 Default_PixelShader3(Default_PixelShader3_Input i) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0, temp1;
|
|
// def c0, 1, -1, 0, 0
|
|
// dcl v0.xyz
|
|
// dcl v1.x
|
|
// dcl t0.xy
|
|
// dcl_2d s0
|
|
// texld r0, t0, s0
|
|
temp0 = tex2D(Texture_0Sampler, i.texcoord.xy);
|
|
// mov r1.xyz, v0
|
|
temp1.xyz = i.color.xyz;
|
|
// mad r0.xyz, r1, r0, c0.y
|
|
temp0.xyz = temp1.xyz * temp0.xyz + float3(-1, -1, -1);
|
|
// mad r1.xyz, v1.x, r0, c0.x
|
|
temp1.xyz = i.color1.xxx * temp0.xyz + float3(1, 1, 1);
|
|
// mov r0.x, c0.x
|
|
temp0.x = float1(1);
|
|
// mul r1.w, r0.w, r0.x
|
|
temp1.w = temp0.w * temp0.x;
|
|
// mov oC0, r1
|
|
out_color = temp1;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// Default_VertexShader4 Vertex_2_0 Has PRES True
|
|
struct Default_VertexShader4_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
};
|
|
|
|
struct Default_VertexShader4_Output
|
|
{
|
|
float4 position : POSITION;
|
|
float2 texcoord : TEXCOORD;
|
|
float3 color : COLOR;
|
|
float color1 : COLOR1;
|
|
};
|
|
|
|
Default_VertexShader4_Output Default_VertexShader4(Default_VertexShader4_Input i)
|
|
{
|
|
/*
|
|
PRSI
|
|
OutputRegisterOffset: 15
|
|
Unknown1: 0
|
|
Unknown2: 0
|
|
OutputRegisterCount: 2
|
|
Unknown3: 0
|
|
Unknown4: 0
|
|
Unknown5: 15
|
|
Unknown6: 2
|
|
Mappings: 1
|
|
0 - ConstOutput: 0 ConstInput 0
|
|
|
|
*/
|
|
float4 expr15;
|
|
float4 expr16;
|
|
{
|
|
// Expression_2_1
|
|
// mul c15.xy, c2.x, c1.zw
|
|
expr15.xy = Time.x * TexCoordTransform_0.zw;
|
|
// mov c16.xyz, c0.xyz
|
|
expr16.xyz = ColorEmissive.xyz;
|
|
}
|
|
|
|
Default_VertexShader4_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 r0.xy, c17
|
|
temp0.xy = TexCoordTransform_0.xy;
|
|
// mad oT0.xy, v1, r0, c15
|
|
o.texcoord = i.texcoord * temp0 + expr15;
|
|
// mov oD0.xyz, c16
|
|
o.color = expr16;
|
|
// mov oD1.x, c0.x
|
|
o.color1 = float4(1, 1, 1, 1);
|
|
//
|
|
|
|
return o;
|
|
}
|
|
|
|
technique Default
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 Default_VertexShader4(); // 14
|
|
PixelShader = compile ps_2_0 Default_PixelShader3(); // 15
|
|
ZEnable = 1;
|
|
ZFunc = 4;
|
|
CullMode = 2;
|
|
AlphaTestEnable = 0;
|
|
ZWriteEnable = Default_Expression2(); // 0
|
|
AlphaBlendEnable = Default_Expression1(); // 0
|
|
SrcBlend = 5;
|
|
DestBlend = 6;
|
|
}
|
|
}
|
|
|