Michael Ludwig  committed b8cdf4a

Make transparent objects no longer cast shadows in FFP

  • Participants
  • Parent commits 8a48b23

Comments (0)

Files changed (1)

File ferox-scene/src/main/java/com/ferox/scene/controller/ffp/

 import com.ferox.scene.Light;
 import com.ferox.scene.Renderable;
 import com.ferox.scene.Transform;
+import com.ferox.scene.Transparent;
 import com.ferox.scene.controller.PVSResult;
 import com.lhkbob.entreri.Component;
 import com.lhkbob.entreri.Entity;
         Map<GeometryState, Integer> geomState = new HashMap<GeometryState, Integer>();
         Map<IndexBufferState, Integer> renderState = new HashMap<IndexBufferState, Integer>();
         for (Entity e : pvs.getPotentiallyVisibleSet()) {
+            // skip transparent entities, as its somewhat physically plausible that
+            // they'd cast fainter shadows, and with the quality of FFP shadow mapping,
+            // being able to see the shadows the cast immediately underneath them is
+            // very bad looking
+            if (e.get(Transparent.class) != null) {
+                continue;
+            }