Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
make visible shadow not mandatory for displaying shadows when the obj…
Browse files Browse the repository at this point in the history
…ect is visible.
  • Loading branch information
e2002e committed Aug 20, 2024
1 parent d07cc65 commit d10fb2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/iron/object/MeshObject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ class MeshObject extends Object {
if (!isLodMaterial() && !validContext(mats, context)) return true;

var isShadow = context == "shadowmap";
if (!visible && !isShadow) return setCulled(isShadow, true);
if (!visibleShadow && isShadow) return setCulled(isShadow, true);
if (!visible && !visibleShadow) setCulled(isShadow, true); // Skip render if object is hidden
if ((visibleShadow && !visible) && context != "voxel" && context != "shadowmap") setCulled(isShadow, true);

if (skip_context == context) return setCulled(isShadow, true);
if (force_context != null && force_context != context) return setCulled(isShadow, true);
Expand Down

0 comments on commit d10fb2c

Please sign in to comment.