Rant on stencil
by Jonathan Arsenault · in Torque 2D Professional · 08/06/2013 (3:54 pm) · 2 replies
I really want access to some stencil buffer without having to gut the whole engine so...
Maybe SceneLayer could be a first class object, defining batching group and giving stencil access to the Scene to do easy masking/blending between whole object layers, all SceneObject in a SceneLayer should be really get batched together.
Maybe SceneLayer could be a first class object, defining batching group and giving stencil access to the Scene to do easy masking/blending between whole object layers, all SceneObject in a SceneLayer should be really get batched together.
About the author
Made a small foray in the gaming industry working at Citeremis, worked and offered consultation in many other sector since, passing through casino management, the wood transformation industry and the transportation sector. Eat code for breakfast.
#2
08/07/2013 (4:32 pm)
I really need to find some time to go play with his branch, making the Layer an object is definitively a move in the right direction. Not sure he has got all the batching right yet, but he seem to have changed so much about the renderer that i might be loosing my time gutting what's in torque currently. Looked a bit more carefully how the blending are currently routed down and the rabbit hole goes quite deep... i am contemplating to instead add a way to connect SceneBatchListener of some sort who could tell consumer when a new batch (or specific named layer/batch?) is submitted and hack my way into the batch/render query directly from there to manipulate their stencil as a quick hack. So not quite sure how yet, but i WILL get to them eventually ;)
Associate Mike Lilligreen
Retired T2Der
He's implemented a new layer system based on SimSet. Something to perhaps look at:
github.com/pchan126/Torque2D/blob/feature/gfx-glfw/engine/source/2d/scene/Layer....
I've spent a lot of time fooling around with blending, and yeah, T2D is pretty restricted in what it can do since it only uses glBlendFunc, instead of glBlendFuncSeparate.