From 20622848ad317aa8fbc964e5196d993de3cc6d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= <91607630+disketflu@users.noreply.github.com> Date: Tue, 22 Mar 2022 14:46:40 +0100 Subject: [PATCH] Update scene_vr lua with passId parameter --- scene_vr.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scene_vr.lua b/scene_vr.lua index b056359..2b3de54 100644 --- a/scene_vr.lua +++ b/scene_vr.lua @@ -88,17 +88,18 @@ while not hg.ReadKeyboard():Key(hg.K_Escape) do left, right = hg.OpenVRStateToViewState(vr_state) vid = 0 -- keep track of the next free view id + passId = hg.SceneForwardPipelinePassViewId() -- Prepare view-independent render data once - vid, passId = hg.PrepareSceneForwardPipelineCommonRenderData(vid, scene, render_data, pipeline, res) + vid, passId = hg.PrepareSceneForwardPipelineCommonRenderData(vid, scene, render_data, pipeline, res, passId) vr_eye_rect = hg.IntRect(0, 0, vr_state.width, vr_state.height) -- Prepare the left eye render data then draw to its framebuffer - vid, passId = hg.PrepareSceneForwardPipelineViewDependentRenderData(vid, left, scene, render_data, pipeline, res) + vid, passId = hg.PrepareSceneForwardPipelineViewDependentRenderData(vid, left, scene, render_data, pipeline, res, passId) vid, passId = hg.SubmitSceneToForwardPipeline(vid, scene, vr_eye_rect, left, pipeline, render_data, res, vr_left_fb:GetHandle()) -- Prepare the right eye render data then draw to its framebuffer - vid, passId = hg.PrepareSceneForwardPipelineViewDependentRenderData(vid, right, scene, render_data, pipeline, res) + vid, passId = hg.PrepareSceneForwardPipelineViewDependentRenderData(vid, right, scene, render_data, pipeline, res, passId) vid, passId = hg.SubmitSceneToForwardPipeline(vid, scene, vr_eye_rect, right, pipeline, render_data, res, vr_right_fb:GetHandle()) -- Display the VR eyes texture to the backbuffer