185 lines
5.2 KiB
HLSL
185 lines
5.2 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;>;
|
|
row_major float4x4 WorldViewProjection : WorldViewProjection;
|
|
texture Sampler_PostProcess <string UIName = "None";>; // 2
|
|
sampler2D Sampler_PostProcessSampler : register(ps_2_0, s0) <string Texture = "Sampler_PostProcess"; string UIName = "None";> =
|
|
sampler_state
|
|
{
|
|
Texture = <Sampler_PostProcess>; // 4
|
|
MinFilter = 1;
|
|
MagFilter = 1;
|
|
MipFilter = 1;
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
};
|
|
float4 ColorToWrite;
|
|
// _ShadowMapPostProcess_PixelShader1 Pixel_2_0 Has PRES False
|
|
float4 _ShadowMapPostProcess_PixelShader1(float2 texcoord : TEXCOORD) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0, temp1, temp2, temp3, temp4;
|
|
// def c0, 0.0009765625, 0, -0, -0.0009765625
|
|
// def c1, 0.5, 0, 0, 0
|
|
// def c2, 0, 0.0009765625, -0.0009765625, -0
|
|
// dcl t0.xy
|
|
// dcl_2d s0
|
|
// add r0.xy, t0, c0
|
|
temp0.xy = texcoord.xy + float2(0.0009765625, 0);
|
|
// add r1.xy, t0, c0.wzyx
|
|
temp1.xy = texcoord.xy + float2(-0.0009765625, -0);
|
|
// add r2.xy, t0, c2
|
|
temp2.xy = texcoord.xy + float2(0, 0.0009765625);
|
|
// add r3.xy, t0, c2.wzyx
|
|
temp3.xy = texcoord.xy + float2(-0, -0.0009765625);
|
|
// texld r0, r0, s0
|
|
temp0 = tex2D(Sampler_PostProcessSampler, temp0.xy);
|
|
// texld r1, r1, s0
|
|
temp1 = tex2D(Sampler_PostProcessSampler, temp1.xy);
|
|
// texld r2, r2, s0
|
|
temp2 = tex2D(Sampler_PostProcessSampler, temp2.xy);
|
|
// texld r3, r3, s0
|
|
temp3 = tex2D(Sampler_PostProcessSampler, temp3.xy);
|
|
// texld r4, t0, s0
|
|
temp4 = tex2D(Sampler_PostProcessSampler, texcoord.xy);
|
|
// max r2.y, r0.x, r1.x
|
|
temp2.y = max(temp0.x, temp1.x);
|
|
// max r0.x, r2.x, r3.x
|
|
temp0.x = max(temp2.x, temp3.x);
|
|
// max r1.x, r2.y, r0.x
|
|
temp1.x = max(temp2.y, temp0.x);
|
|
// lrp r0, c1.x, r1.x, r4.x
|
|
temp0 = lerp(temp4.x, temp1.x, float4(0.5, 0.5, 0.5, 0.5));
|
|
// mov oC0, r0
|
|
out_color = temp0;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// _ShadowMapPostProcess_VertexShader2 Vertex_2_0 Has PRES False
|
|
struct _ShadowMapPostProcess_VertexShader2_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
};
|
|
|
|
struct _ShadowMapPostProcess_VertexShader2_Output
|
|
{
|
|
float4 position : POSITION;
|
|
float2 texcoord : TEXCOORD;
|
|
};
|
|
|
|
_ShadowMapPostProcess_VertexShader2_Output _ShadowMapPostProcess_VertexShader2(_ShadowMapPostProcess_VertexShader2_Input i)
|
|
{
|
|
_ShadowMapPostProcess_VertexShader2_Output o;
|
|
// def c0, 1, 0, 0, 0
|
|
// dcl_position v0
|
|
// dcl_texcoord v1
|
|
// mov oPos.xyz, v0
|
|
o.position.xyz = i.position.xyz;
|
|
// mov oPos.w, c0.x
|
|
o.position.w = float1(1);
|
|
// mov oT0.xy, v1
|
|
o.texcoord = i.texcoord;
|
|
//
|
|
|
|
return o;
|
|
}
|
|
|
|
// _WriteColor_PixelShader3 Pixel_2_0 Has PRES True
|
|
float4 _WriteColor_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 = ColorToWrite;
|
|
}
|
|
|
|
float4 out_color;
|
|
// mov oC0, c11
|
|
out_color = expr11;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// _WriteColor_VertexShader4 Vertex_2_0 Has PRES False
|
|
float4 _WriteColor_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 _WriteColor
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 _WriteColor_VertexShader4(); // 7
|
|
PixelShader = compile ps_2_0 _WriteColor_PixelShader3(); // 8
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
AlphaBlendEnable = 0;
|
|
AlphaTestEnable = 0;
|
|
}
|
|
}
|
|
|
|
technique _ShadowMapPostProcess
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 _ShadowMapPostProcess_VertexShader2(); // 9
|
|
PixelShader = compile ps_2_0 _ShadowMapPostProcess_PixelShader1(); // 10
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
AlphaBlendEnable = 0;
|
|
AlphaTestEnable = 0;
|
|
}
|
|
}
|
|
|