Fixed damageshader color parameter being optimized out

color is a parameter for the main function
This commit is contained in:
Juan Pablo Arce
2017-12-31 19:15:52 -03:00
parent 5c2872c1e1
commit fa09aaa57c
4 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; }
Texture2D xStencil;
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
float4 color;
float4 inColor;
float aCutoff;
float aMultiplier;
@@ -15,7 +15,7 @@ float cMultiplier;
float4 main(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = xTexture.Sample(TextureSampler, texCoord) * color;
float4 c = xTexture.Sample(TextureSampler, texCoord) * inColor;
float4 stencilColor = xStencil.Sample(StencilSampler, texCoord);

View File

@@ -5,7 +5,7 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; }
Texture xStencil;
sampler StencilSampler = sampler_state { Texture = <xStencil>; };
float4 color;
float4 inColor;
float aCutoff;
float aMultiplier;
@@ -15,7 +15,7 @@ float cMultiplier;
float4 main(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 c = tex2D(TextureSampler, texCoord) * color;
float4 c = tex2D(TextureSampler, texCoord) * inColor;
float4 stencilColor = tex2D(StencilSampler, texCoord);