111 lines
2.9 KiB
HLSL
111 lines
2.9 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;>;
|
|
texture BaseTexture <string UIWidget = "None";>; // 2
|
|
sampler2D BaseTextureSampler : register(ps_2_0, s0) <string Texture = "BaseTexture"; string UIWidget = "None";> =
|
|
sampler_state
|
|
{
|
|
Texture = <BaseTexture>; // 4
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
MinFilter = 2;
|
|
MagFilter = 2;
|
|
MipFilter = 2;
|
|
};
|
|
// Blit_PixelShader1 Pixel_2_0 Has PRES False
|
|
struct Blit_PixelShader1_Input
|
|
{
|
|
float2 texcoord : TEXCOORD;
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
float4 Blit_PixelShader1(Blit_PixelShader1_Input i) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0;
|
|
// dcl t0.xy
|
|
// dcl v0
|
|
// dcl_2d s0
|
|
// texld r0, t0, s0
|
|
temp0 = tex2D(BaseTextureSampler, i.texcoord.xy);
|
|
// mul r0, r0, v0
|
|
temp0 = temp0 * i.color;
|
|
// mov oC0, r0
|
|
out_color = temp0;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// Blit_VertexShader2 Vertex_2_0 Has PRES False
|
|
struct Blit_VertexShader2_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
struct Blit_VertexShader2_Output
|
|
{
|
|
float4 position : POSITION;
|
|
float2 texcoord : TEXCOORD;
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
Blit_VertexShader2_Output Blit_VertexShader2(Blit_VertexShader2_Input i)
|
|
{
|
|
Blit_VertexShader2_Output o;
|
|
// def c0, 0, 1, 0, 0
|
|
// dcl_position v0
|
|
// dcl_texcoord v1
|
|
// dcl_color v2
|
|
// mov oPos.xy, v0
|
|
o.position.xy = i.position.xy;
|
|
// mov oPos.zw, c0.xyxy
|
|
o.position.zw = float2(0, 1);
|
|
// mov oT0.xy, v1
|
|
o.texcoord = i.texcoord;
|
|
// mov oD0, v2
|
|
o.color = i.color;
|
|
//
|
|
|
|
return o;
|
|
}
|
|
|
|
technique Blit
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 Blit_VertexShader2(); // 7
|
|
PixelShader = compile ps_2_0 Blit_PixelShader1(); // 8
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
SrcBlend = 5;
|
|
DestBlend = 6;
|
|
AlphaBlendEnable = 1;
|
|
AlphaTestEnable = 0;
|
|
}
|
|
}
|
|
|