New rendering capabilities

Posted on

Screenshot of selection at 2019-02-17 22:01:23
Screenshot of selection at 2019-02-17 22:01:41
alpha_channel_override_demo
  • New Appearance.alphaChannel field (TAppearanceNode.AlphaChannel in Pascal) determines alpha channel treatment when rendering a shape with given appearance. We can use alpha testing, alpha blending, or ignore the alpha channel (render as opaque).

    This field overrides the engine auto-detection “how to treat alpha”, which normally looks at Material.trasparent and the alpha channels of textures (which can, in turn, be affected by ImageTexture.alphaChannel). If you set Appearance.alphaChannel to something other than "AUTO" then we avoid any auto-detection, and we just render according to this field.

    This corresponds to glTF alphaMode.

  • New utility methods TCastle2DSceneManager.PositionTo2DWorld and TCastleSceneManager.PositionToWorldPlane have been added, to easily convert mouse/touch position into a position inside 3D/2D game world.

    Our example 2d_dragon_spine_game inside CGE sources demonstrates this, using SceneManager.PositionToWorldPlane to determine target position of the dragon. Also, this example now demonstrates animation blending.

  • glTF texture can be converted to a MovieTexture . If your texture URL is like .avi or .mpg, we will automatically load it as MovieTexture in X3D, and it will actually play in a loop (if you have ffmpeg installed).

Start the discussion at Castle Game Engine Forum