v1.0.20.1 (summer patch)

This commit is contained in:
itchyOwl
2023-06-15 16:46:54 +03:00
parent 6acac1d143
commit 83de72e3d2
209 changed files with 4497 additions and 2488 deletions
@@ -5,6 +5,8 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; }
Texture2D xStencil;
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
float4 solidColor;
float4 inColor;
float aCutoff;
@@ -16,7 +18,6 @@ float cMultiplier;
float4 main(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = xTexture.Sample(TextureSampler, texCoord) * inColor;
float4 stencilColor = xStencil.Sample(StencilSampler, texCoord);
float aDiff = stencilColor.a - aCutoff;
@@ -30,6 +31,18 @@ float4 main(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord
min(aDiff * aMultiplier, c.a));
}
float4 solidColorStencil(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = xTexture.Sample(TextureSampler, texCoord) * inColor;
float4 stencilColor = xStencil.Sample(StencilSampler, texCoord);
float aDiff = stencilColor.a - aCutoff;
clip(aDiff);
return float4(solidColor.rgb, solidColor.a * min(aDiff * aMultiplier, c.a));
}
technique StencilShader
{
pass Pass1
@@ -37,3 +50,11 @@ technique StencilShader
PixelShader = compile ps_4_0_level_9_1 main();
}
}
technique StencilShaderSolidColor
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 solidColorStencil();
}
}
@@ -5,6 +5,8 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; }
Texture xStencil;
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
float4 solidColor;
float4 inColor;
float aCutoff;
@@ -16,7 +18,6 @@ float cMultiplier;
float4 main(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = tex2D(TextureSampler, texCoord) * inColor;
float4 stencilColor = tex2D(StencilSampler, texCoord);
float aDiff = stencilColor.a - aCutoff;
@@ -30,6 +31,18 @@ float4 main(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord
min(aDiff * aMultiplier, c.a));
}
float4 solidColorStencil(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = tex2D(TextureSampler, texCoord) * inColor;
float4 stencilColor = tex2D(StencilSampler, texCoord);
float aDiff = stencilColor.a - aCutoff;
clip(aDiff);
return float4(solidColor.rgb, solidColor.a * min(aDiff * aMultiplier, c.a));
}
technique StencilShader
{
pass Pass1
@@ -37,3 +50,11 @@ technique StencilShader
PixelShader = compile ps_2_0 main();
}
}
technique StencilShaderSolidColor
{
pass Pass1
{
PixelShader = compile ps_2_0 solidColorStencil();
}
}
@@ -30,11 +30,18 @@ float xLosAlpha;
float4 xColor;
float blurDistance;
float4 mainPS(VertexShaderOutput input) : COLOR0
{
float4 sampleColor = xTexture.Sample(TextureSampler, input.TexCoords);
float4 losColor = xLosTexture.Sample(LosSampler, input.TexCoords);
float4 losColor = xLosTexture.Sample(LosSampler, float2(input.TexCoords.x + blurDistance, input.TexCoords.y + blurDistance));
losColor += xLosTexture.Sample(LosSampler, float2(input.TexCoords.x - blurDistance, input.TexCoords.y - blurDistance));
losColor += xLosTexture.Sample(LosSampler, float2(input.TexCoords.x + blurDistance, input.TexCoords.y - blurDistance));
losColor += xLosTexture.Sample(LosSampler, float2(input.TexCoords.x - blurDistance, input.TexCoords.y + blurDistance));
losColor = losColor * 0.25f;
float obscureAmount = 1.0f - losColor.r;
float4 outColor = float4(
@@ -53,4 +60,4 @@ technique LosShader
VertexShader = compile vs_4_0_level_9_1 mainVS();
PixelShader = compile ps_4_0_level_9_1 mainPS();
}
}
}
@@ -30,10 +30,16 @@ float xLosAlpha;
float4 xColor;
float blurDistance;
float4 mainPS(VertexShaderOutput input) : COLOR0
{
float4 sampleColor = tex2D(TextureSampler, input.TexCoords);
float4 losColor = tex2D(LosSampler, input.TexCoords);
float4 losColor = tex2D(LosSampler, float2(input.TexCoords.x + blurDistance, input.TexCoords.y + blurDistance));
losColor += tex2D(LosSampler, float2(input.TexCoords.x - blurDistance, input.TexCoords.y - blurDistance));
losColor += tex2D(LosSampler, float2(input.TexCoords.x + blurDistance, input.TexCoords.y - blurDistance));
losColor += tex2D(LosSampler, float2(input.TexCoords.x - blurDistance, input.TexCoords.y + blurDistance));
losColor = losColor * 0.25f;
float obscureAmount = 1.0f - losColor.r;