From fa09aaa57c484ebe8fa1d185ef1be2c1ccdf4ebb Mon Sep 17 00:00:00 2001 From: Juan Pablo Arce Date: Sun, 31 Dec 2017 19:15:52 -0300 Subject: [PATCH] Fixed damageshader color parameter being optimized out color is a parameter for the main function --- .../BarotraumaShared/Content/damageshader.fx | 4 ++-- .../BarotraumaShared/Content/damageshader.xnb | Bin 1370 -> 1356 bytes .../Content/damageshader_opengl.fx | 4 ++-- .../Content/damageshader_opengl.xnb | Bin 1344 -> 1360 bytes 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Content/damageshader.fx b/Barotrauma/BarotraumaShared/Content/damageshader.fx index 1fd8ed773..8444fd9c6 100644 --- a/Barotrauma/BarotraumaShared/Content/damageshader.fx +++ b/Barotrauma/BarotraumaShared/Content/damageshader.fx @@ -5,7 +5,7 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = ; } Texture2D xStencil; sampler StencilSampler = sampler_state { Texture = ; }; -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); diff --git a/Barotrauma/BarotraumaShared/Content/damageshader.xnb b/Barotrauma/BarotraumaShared/Content/damageshader.xnb index 5d3aad9e71b57dc253b255e7342dd52269c1e35f..645deb75051b20dad7b1dfa7395fea9690f96dbf 100644 GIT binary patch delta 357 zcmXX?Jxjzu5Ph@RBk@lB0EPAQHUIhn3cX0Wnfy4bU@?`wHye9Bb z0U&cw3vlYtOAvfGz+TkuoJ{v#;>Bxuy!|@&e&23{%KVHYuuViHHrS7d)>(JgXP*Nq z%YK*wLaM?Y#i15K2SJApjgW%Hw8gYHS7`6M?*~{dRd|=l6xLyDHIYxmOyu8iL)NZDo~=8DzZBs zVhdclM&zTE=$cOX??jgBHwlYFE{p)Q^{i@5dg4Uo|sy*SZm3m+e#K?CD$k=?}%sMBe}a diff --git a/Barotrauma/BarotraumaShared/Content/damageshader_opengl.fx b/Barotrauma/BarotraumaShared/Content/damageshader_opengl.fx index 72c4f7dd7..c50fe7fb9 100644 --- a/Barotrauma/BarotraumaShared/Content/damageshader_opengl.fx +++ b/Barotrauma/BarotraumaShared/Content/damageshader_opengl.fx @@ -5,7 +5,7 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = ; } Texture xStencil; sampler StencilSampler = sampler_state { Texture = ; }; -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); diff --git a/Barotrauma/BarotraumaShared/Content/damageshader_opengl.xnb b/Barotrauma/BarotraumaShared/Content/damageshader_opengl.xnb index bcca611d3a757c6abe3185e34e8477e681bc2948..d94d72e73f79a0346061f507a3ef4c2940089662 100644 GIT binary patch delta 208 zcmX@Wb%BdL!p|v%l_6jvd#mXI76t}icee-*h6`>s(u@KH#qp(inQ8e&xyA8ismUe* z46Fb%2XK!p|v%mBC>md#lj~76t}icee-*hLrBzO^gBs#qp(inQ8e&xyA8ismUe| z3_t}8i~Kku@)ua!P7iW?rfS z(2z0%g))TPWH+W|j0Th6GAS||PUdH>WHg%G$*jU?Jb4|nE@Ro`JIs1OlAEPYfQ5mP Uk%1Mczu1tKk%572@=liN0QGh