I am trying to render the fullscreen quad/triangle through my custom implementation of HLMS, but it seems that there is no access to the SceneManager.
- The CompositorManager2's constructor creates mSharedTriangleFS and mSharedQuadFS directly without scene manager (see CompositorPassQuad::mFsRect)
- Hlms::fillBuffersFor is called from RenderQueue::renderSingleObject - the RenderQueue has access to its SceneManager, but it is not passed to the call
- in the Hlms::fillBuffersFor, the queuedRenderable.movableObject->_getManager() returns nullptr because of the construction of the quad/triangle in CompositorManager2
- in the Hlms::fillBuffersFor, the Ogre::Root::getSingleton()._getCurrentSceneManager() returns nullptr as well
I need to access the compositor texture(s) via SceneManager::getCompositorTextures(). I see that in HlmsLowLevel where the same logic is needed, the SceneManager is rather cached in the member variable within the call HlmsLowLevel::preparePassHash, but I find it as bad practice. Why the SceneManager is not passed to the calls as the caller (RenderQueue) has always access to it? If the currently used approach is acceptable, why it is not already part of base class Hlms? Every custom implementation of Hlms which implemets the fillBuffersFor, needs the same logic.
Jsut a side note: I want to avoid legacy materials, because my implementation of Hlms automatically translates the shaders to GLSL so I don't need to write separate shaders for GLSL which I find as huge advantage. For the quad rendering I need multiple techniques with different logic so multiple different (relatively) simple shaders.
