Prevents FloorOcclusion from breaking rendering (#25960)
* Prevents FloorOcclusion from breaking rendering * Minor change
This commit is contained in:
parent
1eb2bcf455
commit
717da4a8f3
1 changed files with 6 additions and 1 deletions
|
|
@ -43,9 +43,14 @@ public sealed class FloorOcclusionSystem : SharedFloorOcclusionSystem
|
|||
|
||||
private void SetShader(SpriteComponent sprite, bool enabled)
|
||||
{
|
||||
var shader = _proto.Index<ShaderPrototype>("HorizontalCut").Instance();
|
||||
|
||||
if (sprite.PostShader is not null && sprite.PostShader != shader)
|
||||
return;
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
sprite.PostShader = _proto.Index<ShaderPrototype>("HorizontalCut").Instance();
|
||||
sprite.PostShader = shader;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue