Build 0.21.6.0 (1.0 pre-patch)
This commit is contained in:
@@ -79,3 +79,8 @@
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:blueprintshader.fx
|
||||
|
||||
#begin wearableclip.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:wearableclip.fx
|
||||
|
||||
@@ -78,3 +78,9 @@
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:thresholdtint_opengl.fx
|
||||
|
||||
#begin wearableclip_opengl.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:wearableclip_opengl.fx
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
Texture2D xTexture;
|
||||
sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; };
|
||||
|
||||
Texture2D xStencil;
|
||||
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
|
||||
|
||||
float aCutoff;
|
||||
float4x4 wearableUvToClipperUv;
|
||||
float clipperTexelSize;
|
||||
|
||||
float stencilSample(float2 texCoord, float2 offset)
|
||||
{
|
||||
return xStencil.Sample(
|
||||
StencilSampler,
|
||||
mul(float4(texCoord.x, texCoord.y, 0, 1), wearableUvToClipperUv).xy + offset).a;
|
||||
}
|
||||
|
||||
float4 main(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float4 c = xTexture.Sample(TextureSampler, texCoord) * color;
|
||||
|
||||
float minStencil = stencilSample(texCoord, float2(0,0));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(-clipperTexelSize,0)));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(clipperTexelSize,0)));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(0,-clipperTexelSize)));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(0,clipperTexelSize)));
|
||||
|
||||
float aDiff = minStencil - aCutoff;
|
||||
|
||||
clip(aDiff);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
technique StencilShader
|
||||
{
|
||||
pass Pass1
|
||||
{
|
||||
PixelShader = compile ps_4_0_level_9_1 main();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
Texture2D xTexture;
|
||||
sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; };
|
||||
|
||||
Texture2D xStencil;
|
||||
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
|
||||
|
||||
float aCutoff;
|
||||
float4x4 wearableUvToClipperUv;
|
||||
float clipperTexelSize;
|
||||
|
||||
float stencilSample(float2 texCoord, float2 offset)
|
||||
{
|
||||
return tex2D(
|
||||
StencilSampler,
|
||||
mul(float4(texCoord.x, texCoord.y, 0, 1), wearableUvToClipperUv).xy + offset).a;
|
||||
}
|
||||
|
||||
float4 main(float4 position : POSITION0, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float4 c = tex2D(TextureSampler, texCoord) * color;
|
||||
|
||||
float minStencil = stencilSample(texCoord, float2(0,0));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(-clipperTexelSize,0)));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(clipperTexelSize,0)));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(0,-clipperTexelSize)));
|
||||
minStencil = min(minStencil, stencilSample(texCoord, float2(0,clipperTexelSize)));
|
||||
|
||||
float aDiff = minStencil - aCutoff;
|
||||
|
||||
clip(aDiff);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
technique StencilShader
|
||||
{
|
||||
pass Pass1
|
||||
{
|
||||
PixelShader = compile ps_2_0 main();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user