Unstable 0.1500.4.0 (Shrek edition)

This commit is contained in:
Markus Isberg
2021-09-23 21:29:31 +09:00
parent 5a6bbcc79e
commit 3043a9a7bc
124 changed files with 3571 additions and 1848 deletions
@@ -67,6 +67,12 @@
/processorParam:DebugMode=Auto
/build:grainshader.fx
#begin thresholdtint.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:thresholdtint.fx
#begin blueprintshader.fx
/importer:EffectImporter
/processor:EffectProcessor
@@ -72,3 +72,9 @@
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:blueprintshader_opengl.fx
#begin thresholdtint_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:thresholdtint_opengl.fx
@@ -0,0 +1,32 @@
Texture2D xBaseTexture;
sampler BaseTextureSampler = sampler_state { Texture = <xBaseTexture>; };
Texture2D xTintMaskTexture;
sampler TintMaskTextureSampler = sampler_state { Texture = <xTintMaskTexture>; };
Texture2D xCutoffTexture;
sampler CutoffTextureSampler = sampler_state { Texture = <xCutoffTexture>; };
float highlightThreshold;
float highlightMultiplier;
float baseToCutoffSizeRatio;
float4 mainPS(float4 position : SV_POSITION, float4 clr : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 baseSample = xBaseTexture.Sample(BaseTextureSampler, texCoord);
float3 tintMaskSample = xTintMaskTexture.Sample(TintMaskTextureSampler, texCoord).rgb;
float cutoffSample = xCutoffTexture.Sample(CutoffTextureSampler, texCoord * baseToCutoffSizeRatio).r;
float3 highlight = saturate((baseSample.rgb - (highlightThreshold * float3(1,1,1))) * highlightMultiplier);
float3 tinted = saturate(baseSample.rgb * clr.rgb + highlight);
return float4(
(tinted * tintMaskSample) + (baseSample.rgb * (float3(1,1,1) - tintMaskSample)),
baseSample.a * cutoffSample * clr.a);
}
technique ThresholdTintShader
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 mainPS();
}
}
@@ -0,0 +1,32 @@
Texture2D xBaseTexture;
sampler BaseTextureSampler = sampler_state { Texture = <xBaseTexture>; };
Texture2D xTintMaskTexture;
sampler TintMaskTextureSampler = sampler_state { Texture = <xTintMaskTexture>; };
Texture2D xCutoffTexture;
sampler CutoffTextureSampler = sampler_state { Texture = <xCutoffTexture>; };
float highlightThreshold;
float highlightMultiplier;
float baseToCutoffSizeRatio;
float4 mainPS(float4 position : SV_POSITION, float4 clr : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 baseSample = tex2D(BaseTextureSampler, texCoord);
float3 tintMaskSample = tex2D(TintMaskTextureSampler, texCoord).rgb;
float cutoffSample = tex2D(CutoffTextureSampler, texCoord * baseToCutoffSizeRatio).r;
float3 highlight = saturate((baseSample.rgb - (highlightThreshold * float3(1,1,1))) * highlightMultiplier);
float3 tinted = saturate(baseSample.rgb * clr.rgb + highlight);
return float4(
(tinted * tintMaskSample) + (baseSample.rgb * (float3(1,1,1) - tintMaskSample)),
baseSample.a * cutoffSample * clr.a);
}
technique ThresholdTintShader
{
pass Pass1
{
PixelShader = compile ps_2_0 mainPS();
}
}