New Screen Effects API and Demo, Text Node Optimizations, Multi-texture Modes Fixes

Posted on

Screenshot of selection at 2018-07-29 05:15:01
Screenshot of selection at 2018-07-29 05:16:00
  1. New class TCastleScreenEffects offers easier, and at the same time more flexible API to control screen effects.

    • It has a simple AddScreenEffect method that takes X3D node graph with TScreenEffectNode.

    • New demo showing screen effects is in examples/screen_effects_demo.

    • The screen effects can now be applied over any other UI control output (placed as children of TCastleScreenEffects). E.g. trivial TCastleImageControl or complicated TCastleSceneManager.

      For the special case when using with TCastleAbstractViewport (TCastleSceneManager, TCastleViewport), it is even easier, as TCastleAbstractViewport now descends from TCastleScreenEffects, and exposes AddScreenEffect method immediately.

    • We have also added new (float-based) GLSL functions available for screen effects authors. The documentation how to create screen effects shader code is here.

  2. An important optimization of Text node memory usage. Previously a scene with many Text nodes could really eat a lot of memory.

  3. BLEND* multi-texture modes fixed, and many multi-texture modes that can work only on RGB/alpha channels implemented in the shader pipeline. The specification of all supported multi-texturing modes is here.

Comment on this post ➤