My name is Slamy and I like to program stuff in my free time for fun. In January I got my hands on a VR headset as I thought it would be time to try them out. After playing some games I thought It would be cool to develop something for it. I've tried Unity and Unreal but it was all too much and as I'm already familiar with SDL and a little bit of OpenGL I searched for 3D game engines and ogre-next seemed to be a good choice as It already comes with a working example.
After tinkering with it for quite some time I wanted to get rid of the blue sky and replace with a skybox. Luckily there was already a working example of a Skybox using the Compositor. I tried to combine them as I thought that adding a render_quad to the main_stereo_render might do the trick.
Code: Select all
abstract target rt_renderwindow
{
//Render opaque stuff
pass render_scene
{
load
{
all clear
clear_colour 0.2 0.4 0.6 1
}
store
{
depth dont_care
stencil dont_care
}
overlays off
shadows ShadowMapDebuggingShadowNode
}
//Render sky after opaque stuff (performance optimization)
pass render_quad
{
quad_normals camera_direction
material SkyPostprocess
}
}
abstract target main_stereo_render
{
//Eye render
pass render_scene
{
load
{
all clear
clear_colour 0.2 0.4 0.6 1
}
store
{
depth dont_care
stencil dont_care
}
//0x01234567
identifier 19088743
overlays off
cull_camera VrCullCamera
shadows ShadowMapDebuggingShadowNode
instanced_stereo true
viewport 0 0.0 0.0 0.5 1.0
viewport 1 0.5 0.0 0.5 1.0
}
pass render_quad
{
quad_normals camera_direction
material SkyPostprocess
viewport 0.0 0.0 0.5 1.0
}
pass render_quad
{
quad_normals camera_direction
material SkyPostprocess
viewport 0 0.5 0.0 0.5 1.0
}
}
compositor_node Tutorial_OpenVRNodeNoRDM
{
in 0 stereo_output
target stereo_output : main_stereo_render {}
}
compositor_node Tutorial_OpenVRMirrorWindowNode
{
in 0 rt_renderwindow
target rt_renderwindow : rt_renderwindow {}
}
workspace Tutorial_OpenVRWorkspaceNoRDM
{
connect_output Tutorial_OpenVRNodeNoRDM 0
}
workspace Tutorial_OpenVRMirrorWindowWorkspace
{
//connect_output Tutorial_OpenVRMirrorWindowNode 0
connect_output Tutorial_OpenVRNodeNoRDM 0
}
I had some thoughts but I can't put my finger on it. Maybe its because the Eye positions on the NullCompositor are equal and not equal on the OpenVRCompositorListener?
Is "pass render_quad" even considered a good option for something which also uses "instanced_stereo true" in the rendered scene?
To my shame I'm new to Ogre and also new to OpenVR. So maybe educating myself in both topics at the same time was a bad way to learn.
I hope haven't hurt any rule of the forum by asking this. Maybe someone has an idea for me.
Slamy