mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
fix:xr right eye render failed when using custom render pipeline (#15319)
This commit is contained in:
@@ -561,7 +561,9 @@ void Root::doXRFrameMove(int32_t totalFrames) {
|
||||
if (_xr->isRenderAllowable()) {
|
||||
bool isSceneUpdated = false;
|
||||
int viewCount = _xr->getXRConfig(xr::XRConfigKey::VIEW_COUNT).getInt();
|
||||
bool forceUpdateSceneTwice = _xr->getXRConfig(xr::XRConfigKey::EYE_RENDER_JS_CALLBACK).getBool();
|
||||
// compatible native pipeline
|
||||
static bool isNativePipeline = dynamic_cast<cc::render::NativePipeline*>(_pipelineRuntime.get()) != nullptr;
|
||||
bool forceUpdateSceneTwice = isNativePipeline ? true : _xr->getXRConfig(xr::XRConfigKey::EYE_RENDER_JS_CALLBACK).getBool();
|
||||
for (int xrEye = 0; xrEye < viewCount; xrEye++) {
|
||||
_xr->beginRenderEyeFrame(xrEye);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user