Closed alwex closed 7 years ago
What you want to achieve using such FBO wrapping around the rayHandler?
I want to be able to apply some multiple pass processing shaders above the rendered scene for example.
Sorry, I'm unfortunatelly not an exepert regarding the FBOs :) but isn't that currently possible with disabled automatic drawing for lightmap (#setLightMapRendering(false)) and the #getLightMapTexture() or #getLightMapBuffer()?
I have to look into this. Maybe I'll be able to manage the lightMapBuffer out of the library like this
rayHandler.setLightMapRendering(false);
FBOManager.begin(rayHandler.getLightMapBuffer());
rayHandler.render();
FBOManager.end();
(FBOManager just handle a stack of FBO to avoid them drawing on each others.
I have made the test with the FBOManager I told you about (http://stackoverflow.com/questions/25471727/libgdx-nested-framebuffer) and the light can now be rendered inside another FBO. I think that libgdx may come with such an FBOManager to be able to share it within the differents libraries.
The tweek is just to replace all the fbo.begin()
stuff by FBOManager.instance.begin(fbo)
and the FBOManager will take care of begin/end of all of it's FBO.
currently it is not possible to do something like:
because the rayHandler use it's own FBO. One solution would be to allow to drive FBO outside of the
render
function or to provide a FBO manager handling a stack of FBOssee http://stackoverflow.com/questions/25471727/libgdx-nested-framebuffer for a possible solution