112Shaders/occlusion.fx
2021-12-28 10:06:46 +01:00

166 lines
4.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 FlatColor <string UIWidget = "None"; string SasBindAddress = "WW3D.FlatColor";>;
// _FillColor_PixelShader1 Pixel_2_0 Has PRES True
float4 _FillColor_PixelShader1() : COLOR
{
/*
PRSI
OutputRegisterOffset: 11
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 1
Unknown3: 0
Unknown4: 0
Unknown5: 11
Unknown6: 1
Mappings: 1
0 - ConstOutput: 0 ConstInput 0
*/
float4 expr11;
{
// Expression_2_1
// mov c11, c0
expr11 = FlatColor;
}
float4 out_color;
// mov oC0, c11
out_color = expr11;
//
return out_color;
}
// _FillColor_VertexShader2 Vertex_2_0 Has PRES False
float4 _FillColor_VertexShader2(float4 position : POSITION) : POSITION
{
float4 out_position;
// def c0, 1, 0, 0, 0
// dcl_position v0
// mov oPos.xyz, v0
out_position.xyz = position.xyz;
// mov oPos.w, c0.x
out_position.w = float1(1);
//
return out_position;
}
// _ClearStencil_PixelShader3 Pixel_2_0 Has PRES True
float4 _ClearStencil_PixelShader3() : COLOR
{
/*
PRSI
OutputRegisterOffset: 11
Unknown1: 0
Unknown2: 0
OutputRegisterCount: 1
Unknown3: 0
Unknown4: 0
Unknown5: 11
Unknown6: 1
Mappings: 1
0 - ConstOutput: 0 ConstInput 0
*/
float4 expr11;
{
// Expression_2_1
// mov c11, c0
expr11 = FlatColor;
}
float4 out_color;
// mov oC0, c11
out_color = expr11;
//
return out_color;
}
// _ClearStencil_VertexShader4 Vertex_2_0 Has PRES False
float4 _ClearStencil_VertexShader4(float4 position : POSITION) : POSITION
{
float4 out_position;
// def c0, 1, 0, 0, 0
// dcl_position v0
// mov oPos.xyz, v0
out_position.xyz = position.xyz;
// mov oPos.w, c0.x
out_position.w = float1(1);
//
return out_position;
}
technique _ClearStencil
{
pass P0
{
VertexShader = compile vs_2_0 _ClearStencil_VertexShader4(); // 4
PixelShader = compile ps_2_0 _ClearStencil_PixelShader3(); // 5
ColorWriteEnable = 0;
ZEnable = 1;
ZFunc = 1;
ZWriteEnable = 0;
CullMode = 1;
StencilEnable = 1;
StencilFunc = 2;
StencilPass = 3;
StencilZFail = 3;
StencilFail = 2;
StencilMask = 0;
StencilWriteMask = 0;
StencilRef = 0;
AlphaBlendEnable = 0;
AlphaTestEnable = 0;
}
}
technique _FillColor
{
pass P0
{
VertexShader = compile vs_2_0 _FillColor_VertexShader2(); // 6
PixelShader = compile ps_2_0 _FillColor_PixelShader1(); // 7
ColorWriteEnable = 15;
ZEnable = 0;
ZWriteEnable = 0;
CullMode = 1;
StencilEnable = 1;
StencilFunc = 3;
StencilPass = 1;
StencilZFail = 1;
StencilFail = 1;
StencilWriteMask = -1;
AlphaBlendEnable = 1;
SrcBlend = 5;
DestBlend = 6;
AlphaTestEnable = 0;
}
}