Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
It is possible to define an asymmetric camera frustum (like using glFrustum(left, right, bottom, top, zNear, zFar);)? I tried to use Renderer.setProjection(); but is only called internally by the engine. Can I access / manipulate the projection matrix inside the shader by using a Cobberlicht constant such as worldviewproj? |
||||
|
Hi, this is currently not supported, but one way would be when drawing your own geometry, you could use gl.getUniformLocation(currentGLProgram, "worldviewproj"); where you could get the GL program with renderer.getGLProgramFromMaterialType Also, you could still use renderer.setProjection() with your own projection after the camera has been renderered. Or if using no camera at all, maybe. Maybe this helps. |
||||
|
Thank you for your fast reply. But I am not sure if I understand you correctly. I like to load my scene from a CopperCube file. From my understanding, I could set my own projection Matrix renderer.setProjection() (i.e. in onAfterDrawAll) but it is overwritten when rendering the scene for the active camera, right? So how could I render the scene without any camera? |
||||
|
Maybe the simplest way would be your own camera. Simply derive your own class from the CameraScene node and override the render() function, or modify the camera in your scene to change it's render function to be this:
|
||||
|
|