Prevents FloorOcclusion from breaking rendering (#25960)
* Prevents FloorOcclusion from breaking rendering * Minor change
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user