190 lines
5.3 KiB
HLSL
190 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;>;
|
|
bool IsHdrEnabled <string SasBindAddress = "WW3D.IsHdrEnabled";>;
|
|
texture FrameBufferSampler <string SasBindAddress = "PostEffect.FrameBufferTexture";>; // 3
|
|
sampler2D FrameBufferSamplerSampler : register(ps_2_0, s0) <string Texture = "FrameBufferSampler"; string SasBindAddress = "PostEffect.FrameBufferTexture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <FrameBufferSampler>; // 5
|
|
MinFilter = 2;
|
|
MagFilter = 2;
|
|
MipFilter = 1;
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
};
|
|
texture DistortionOffsetSampler <string SasBindAddress = "PostEffect.Distortion.DistortionOffsetTexture";>; // 8
|
|
sampler2D DistortionOffsetSamplerSampler : register(ps_2_0, s1) <string Texture = "DistortionOffsetSampler"; string SasBindAddress = "PostEffect.Distortion.DistortionOffsetTexture";> =
|
|
sampler_state
|
|
{
|
|
Texture = <DistortionOffsetSampler>; // 10
|
|
MinFilter = 2;
|
|
MagFilter = 2;
|
|
MipFilter = 1;
|
|
AddressU = 3;
|
|
AddressV = 3;
|
|
AddressW = 3;
|
|
};
|
|
// Default_M_PixelShader1 Pixel_2_0 Has PRES False
|
|
float4 Default_M_PixelShader1(float2 texcoord : TEXCOORD) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0;
|
|
// def c0, 2, -0.9960784, 0.08, 0
|
|
// dcl t0.xy
|
|
// dcl_2d s0
|
|
// dcl_2d s1
|
|
// texld r0, t0, s1
|
|
temp0 = tex2D(DistortionOffsetSamplerSampler, texcoord.xy);
|
|
// mad r0.xy, r0, c0.x, c0.y
|
|
temp0.xy = temp0.xy * float2(2, 2) + float2(-0.99607843, -0.99607843);
|
|
// mad r0.xy, r0, c0.z, t0
|
|
temp0.xy = temp0.xy * float2(0.08, 0.08) + texcoord.xy;
|
|
// texld r0, r0, s0
|
|
temp0 = tex2D(FrameBufferSamplerSampler, temp0.xy);
|
|
// mov oC0, r0
|
|
out_color = temp0;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// Default_M_VertexShader2 Vertex_2_0 Has PRES False
|
|
struct Default_M_VertexShader2_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
};
|
|
|
|
struct Default_M_VertexShader2_Output
|
|
{
|
|
float4 position : POSITION;
|
|
float2 texcoord : TEXCOORD;
|
|
};
|
|
|
|
Default_M_VertexShader2_Output Default_M_VertexShader2(Default_M_VertexShader2_Input i)
|
|
{
|
|
Default_M_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;
|
|
}
|
|
|
|
// Default_PixelShader3 Pixel_2_0 Has PRES False
|
|
float4 Default_PixelShader3(float2 texcoord : TEXCOORD) : COLOR
|
|
{
|
|
float4 out_color;
|
|
float4 temp0;
|
|
// def c0, 2, -0.9960784, 0.08, 0
|
|
// dcl t0.xy
|
|
// dcl_2d s0
|
|
// dcl_2d s1
|
|
// texld r0, t0, s1
|
|
temp0 = tex2D(DistortionOffsetSamplerSampler, texcoord.xy);
|
|
// mad r0.xy, r0, c0.x, c0.y
|
|
temp0.xy = temp0.xy * float2(2, 2) + float2(-0.99607843, -0.99607843);
|
|
// mad r0.xy, r0, c0.z, t0
|
|
temp0.xy = temp0.xy * float2(0.08, 0.08) + texcoord.xy;
|
|
// texld r0, r0, s0
|
|
temp0 = tex2D(FrameBufferSamplerSampler, temp0.xy);
|
|
// mov oC0, r0
|
|
out_color = temp0;
|
|
//
|
|
|
|
return out_color;
|
|
}
|
|
|
|
// Default_VertexShader4 Vertex_2_0 Has PRES False
|
|
struct Default_VertexShader4_Input
|
|
{
|
|
float4 position : POSITION;
|
|
float4 texcoord : TEXCOORD;
|
|
};
|
|
|
|
struct Default_VertexShader4_Output
|
|
{
|
|
float4 position : POSITION;
|
|
float2 texcoord : TEXCOORD;
|
|
};
|
|
|
|
Default_VertexShader4_Output Default_VertexShader4(Default_VertexShader4_Input i)
|
|
{
|
|
Default_VertexShader4_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;
|
|
}
|
|
|
|
technique Default
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 Default_VertexShader4(); // 13
|
|
PixelShader = compile ps_2_0 Default_PixelShader3(); // 14
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
AlphaBlendEnable = 0;
|
|
AlphaTestEnable = 0;
|
|
FillMode = 3;
|
|
}
|
|
}
|
|
|
|
technique Default_M
|
|
{
|
|
pass P0
|
|
{
|
|
VertexShader = compile vs_2_0 Default_M_VertexShader2(); // 15
|
|
PixelShader = compile ps_2_0 Default_M_PixelShader1(); // 16
|
|
ZEnable = 0;
|
|
ZWriteEnable = 0;
|
|
CullMode = 1;
|
|
AlphaBlendEnable = 0;
|
|
AlphaTestEnable = 0;
|
|
FillMode = 3;
|
|
}
|
|
}
|
|
|
|
technique Default_L
|
|
{
|
|
}
|
|
|