-
You can easily query whether the scene or shape was (potentially, at least partially) visible in the last rendering event. This accounts for both frustum culling and occlusion culling.
Use
TCastleScene.WasVisible
,TAbstractShapeNode.WasVisible
for this.Demo is in examples/viewport_and_scenes/test_was_visible.
See forum thread for history behind this feature.
-
You can use TCastleRenderOptions.RobustNegativeScale to make lighting work correctly even when combined with negative scale. By default, using negative scale causes trouble for lit objects (as the normal vectors are not coming from the right side) and backface culling. Using the
RobustNegativeScale
makes them reliable (at a small cost at rendering time).
WasVisible: query visibility of scenes and shapes, RobustNegativeScale: support lighting with negative scales
Start the discussion at Castle Game Engine Forum