Custom Shader for 2D Effects on 3D Devices
2D Effects on 3D devices are realized by usage of shader in the RenderDevice2D for implementation of 2D over 3D.
Several times, available effects just for this device have been enhanced (starting with a "Gl" in the name).
For more flexibility and the option, to write custom 2D effects with a custom shader, the API has been enhanced:
- It is possible to provide a custom shader source from an effect implementation
- It is also possible to transfer uniforms (definition and value) from an effect implementation
The API is:
Candera::Internal::Context2DOver3DDevicePool::SetCustomProgram
Candera::Internal::Context2DOver3DDevicePool::ResetCustomProgram
Candera::Internal::Context2DOver3DDevicePool::HasCustomProgram
Furthermore, the RenderDevice2D API has been enhanced to set a second surface (texture).
A new effect, GlMultiTextureBrushBlend, has been added with the purpose to demonstrate the usage of the new API.