@@ -170,7 +170,7 @@ namespace vrperfkit {
170
170
171
171
for (int eye = 0 ; eye < 2 ; ++eye) {
172
172
d3d11Res->multisampled [eye] = false ;
173
- if (submittedEyeChains[eye] == nullptr )
173
+ if (submittedEyeChains[eye] == nullptr || (eye == 1 && submittedEyeChains[ 1 ] == submittedEyeChains[ 0 ]) )
174
174
continue ;
175
175
176
176
int length = 0 ;
@@ -232,7 +232,8 @@ namespace vrperfkit {
232
232
233
233
d3d11Res->usingArrayTex = false ;
234
234
235
- if (submittedEyeChains[1 ] == nullptr ) {
235
+ if (outputEyeChains[1 ] == nullptr ) {
236
+ outputEyeChains[1 ] = outputEyeChains[0 ];
236
237
LOG_INFO << " Game is using a single texture for both eyes" ;
237
238
d3d11Res->submittedTextures [1 ] = d3d11Res->submittedTextures [0 ];
238
239
d3d11Res->resolveTexture [1 ] = d3d11Res->resolveTexture [0 ];
@@ -273,6 +274,7 @@ namespace vrperfkit {
273
274
274
275
void OculusManager::PostProcessD3D11 (ovrLayerEyeFovDepth &eyeLayer) {
275
276
auto projCenters = CalculateProjectionCenter (eyeLayer.Fov );
277
+ bool successfulPostprocessing = false ;
276
278
277
279
for (int eye = 0 ; eye < 2 ; ++eye) {
278
280
int index;
@@ -321,17 +323,24 @@ namespace vrperfkit {
321
323
322
324
Viewport outputViewport;
323
325
if (d3d11Res->postProcessor ->Apply (input, outputViewport)) {
324
- ovr_CommitTextureSwapChain (session, outputEyeChains[eye]);
325
326
eyeLayer.ColorTexture [eye] = outputEyeChains[eye];
326
327
eyeLayer.Viewport [eye].Pos .x = outputViewport.x ;
327
328
eyeLayer.Viewport [eye].Pos .y = outputViewport.y ;
328
329
eyeLayer.Viewport [eye].Size .w = outputViewport.width ;
329
330
eyeLayer.Viewport [eye].Size .h = outputViewport.height ;
331
+ successfulPostprocessing = true ;
330
332
}
331
333
332
334
D3D11_TEXTURE2D_DESC td;
333
335
input.inputTexture ->GetDesc (&td);
334
336
d3d11Res->variableRateShading ->UpdateTargetInformation (td.Width , td.Height , input.mode , projCenters.eyeCenter [0 ].x , projCenters.eyeCenter [0 ].y , projCenters.eyeCenter [1 ].x , projCenters.eyeCenter [1 ].y );
335
337
}
338
+
339
+ if (successfulPostprocessing) {
340
+ ovr_CommitTextureSwapChain (session, outputEyeChains[0 ]);
341
+ if (outputEyeChains[1 ] != outputEyeChains[0 ]) {
342
+ ovr_CommitTextureSwapChain (session, outputEyeChains[1 ]);
343
+ }
344
+ }
336
345
}
337
346
}
0 commit comments