void RowInterleaved3D::Present() const { FGLPostProcessState savedState; savedState.SaveTextureBindings(2); prepareInterleavedPresent(*GLRenderer->mPresent3dRowShader); // Compute absolute offset from top of screen to top of current display window // because we need screen-relative, not window-relative, scan line parity int windowVOffset = 0; #ifdef _WIN32 if (! fullscreen) { I_SaveWindowedPos(); // update win_y CVAR windowVOffset = (win_y + WINDOW_BORDER_VERTICAL_PARITY) % 2; } #endif // _WIN32 GLRenderer->mPresent3dRowShader->WindowPositionParity.Set( (windowVOffset + GLRenderer->mOutputLetterbox.height + 1 // +1 because of origin at bottom ) % 2 ); GLRenderer->RenderScreenQuad(); }
void CheckerInterleaved3D::Present() const { FGLPostProcessState savedState; savedState.SaveTextureBindings(2); prepareInterleavedPresent(*GLRenderer->mPresent3dCheckerShader); // Compute absolute offset from top of screen to top of current display window // because we need screen-relative, not window-relative, scan line parity int windowVOffset = 0; int windowHOffset = 0; #ifdef _WIN32 if (!fullscreen) { I_SaveWindowedPos(); // update win_y CVAR windowHOffset = (win_x + WINDOW_BORDER_HORIZONTAL_PARITY) % 2; windowVOffset = (win_y + WINDOW_BORDER_VERTICAL_PARITY) % 2; } #endif // _WIN32 GLRenderer->mPresent3dCheckerShader->Uniforms->WindowPositionParity = (windowVOffset + windowHOffset + screen->mOutputLetterbox.height + 1 // +1 because of origin at bottom ) % 2; // because we want the top pixel offset, but gl_FragCoord.y is the bottom pixel offset GLRenderer->mPresent3dCheckerShader->Uniforms.Set(); GLRenderer->RenderScreenQuad(); }
void ColumnInterleaved3D::Present() const { FGLPostProcessState savedState; savedState.SaveTextureBindings(2); prepareInterleavedPresent(*GLRenderer->mPresent3dColumnShader); // Compute absolute offset from top of screen to top of current display window // because we need screen-relative, not window-relative, scan line parity int windowHOffset = 0; #ifdef _WIN32 if (!fullscreen) { I_SaveWindowedPos(); // update win_y CVAR windowHOffset = (win_x + WINDOW_BORDER_HORIZONTAL_PARITY) % 2; } #endif // _WIN32 GLRenderer->mPresent3dColumnShader->WindowPositionParity.Set(windowHOffset); GLRenderer->RenderScreenQuad(); }