Canvas properties: Difference between revisions

Jump to navigation Jump to search
m
Line 169: Line 169:
Also, see:
Also, see:
* http://forum.flightgear.org/viewtopic.php?f=71&t=21090
* http://forum.flightgear.org/viewtopic.php?f=71&t=21090
=== Integration with the Effects/Shader framework {{Not done}} ===
At some point, the canvas system itself could probably benefit from being also able to use the Effects/Shader framework, so that canvas textures can also be processed via effects and shaders optionally, before they get drawn. That should make all sorts of fancy effects possible, such as night vision cameras or thermal view, rendered to canvas textures/groups.
It is currently not yet clear how to address this best, the easiest option might be to specify if effects or vertex/fragment shaders shall be invoked via properties (boolean), including their file names referring to [[$FG_ROOT]]?
That would then disable the default rendering pipeline for those canvas textures and use shaders.
Basically, anything that's not possible via the core canvas system or via its Nasal wrappers, would then be handled via effects/shaders. So we would gain lots of flexibility.
Ideally, there could be a simple interface class, so that these things can be customized via listeners, like your property-observer helper, just specific to enabling shaders for a canvas texture.
So if people really want to create really fancy textures or camera views, they could use shaders then, which would keep the design truly generic, and it would ensure that there's no bloat introduced into the main canvas system.
The Effects framework is implemented in SimGear: http://gitorious.org/fg/simgear/trees/next/simgear/scene/material
Also see:
* http://forum.flightgear.org/search.php?st=0&sk=t&sd=d&sr=posts&keywords=canvas+shader
* http://forum.flightgear.org/search.php?st=0&sk=t&sd=d&sr=posts&keywords=canvas+shaders
* http://forum.flightgear.org/search.php?st=0&sk=t&sd=d&sr=posts&keywords=canvas+effects
{{Appendix}}
[[Category:Nasal]]
[[Category:Property Tree]]
[[Category:Core development projects]]

Navigation menu