biospud wrote:The one bug I found relates to quad buffered stereo. If I start gzdoom in quad stereo mode by including "+vr_mode 7" on the command line, the doom screen remains totally black, which is horrible. On the other hand, vr_mode 7 works correctly if I wait and activate it after beginning game play in gzdoom. It's possible this behavior is unchanged from previous versions.
Hmm, that is strange. Could you try add a glDrawBuffer(GL_BACK_LEFT) to the else section of QuadStereo::Present? (
https://github.com/coelckers/gzdoom/blo ... eo.cpp#L62). If that fixes it (for the left eye), then the bQuadStereoSupported check in the constructor must be failing for some reason.
EDIT: Just noticed it does GLRenderer->mBuffers->BindEyeTexture(1, 0) in the else. That should be BindEyeTexture(0, 0) since the right eye is not available due to what the constructor is doing.
biospud wrote:Even if the blending ends up not-quite-right, I believe this two-pass approach is best. I propose we wait and see what blending troubles occur, and then form a plan of attack. Hmm. This might explain some confusion I experienced with the cross-hair blending in GZ3Doom.
I'm not sure if adjusting 2DDrawer to render to a texture is easier. The reason is that the 2D drawer needs to have its blend mode output pre-multiplied alpha, because it can't do the actual final blend until the texture is rendered. Without that change it will darken transparent things instead of making them translucent.
On the other hand, drawing the 2D directly to the quad involves just changing the active matrix to this pseudo code:
transform = projectionMatrix * worldToEye * quadToWorld * transform(-0.5, 0.5) * scale(1/SCREENWIDTH, 1/SCREENHEIGHT, 1)
The only problem with this approach is the scissor clipping, but I think that can be moved to gl_ClipDistance in the shader without too much work.
biospud wrote:I was surprised to notice that dpJudas did not need to create any new shaders to get this all working.
I was going to do exactly what Graf illustrates (with the two input textures) when I discovered I could just get away with the old colormask setup. Didn't see that coming until I got to that step.