20,741
edits
| Line 17: | Line 17: | ||
== Canvas vs. Materials == | == Canvas vs. Materials == | ||
we could implement "chains" of materials where some are the input for a Canvas texture, while others are the "output" of a Canvas texture - which would mean that even schemes like Rembrandt (deferred rendering) could be implemented largely in fgdata space (effects/shaders, for the time being, Rembrandt is using C++ code to set up the corresponding buffers and stages to put everything together, because there really isero Nasal overhead involved as long as only Canvas stage is used, i.e. none of the elements (an empty Canvas referencing a material created by another Canvas/effect). | |||
And that point, you could have a multi-stage, and multi-pass, rendering pipeline implemented solely on top of the FlightGear property tree, by setting up a handful of "buffers" (Canvas FBOs/RTTs) and using them in a "creative" way to chain them together and create the final output. | |||
Also note that we're talking here about roughly 50-100 lines of C++ code to teach the materials manager to retrieve a texture from the Canvas subsystem (instead of the base package) - ThomasS recently implemented the code for the Canvas specific side of this, because he also required hooks to get a Canvas as an osg::Image - so that he could serve it via http (i.e. as a jpeg/png): | |||
[[File:5e/Canvas-ND-live-streaming-via-httpd.png/800px-Canvas-ND-live-streaming-via-httpd.png|250px]] | |||
The Canvas C++ code already has a getTexture2D() callback that we can use.<ref>{{cite web | |||
|url = https://forum.flightgear.org/viewtopic.php?p=298124#p298124 | |||
|title = <nowiki> Re: Dirty airplanes?? </nowiki> | |||
|author = <nowiki> Hooray </nowiki> | |||
|date = Nov 5th, 2016 | |||
|added = Nov 5th, 2016 | |||
|script_version = 0.40 | |||
}}</ref> | |||
== Canvas vs. Effects/Shaders == | == Canvas vs. Effects/Shaders == | ||