Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass of OpenGL rendering pipeline #1201

Draft
wants to merge 76 commits into
base: master
Choose a base branch
from
Draft

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Jun 27, 2022

This allows running with the OpenGL pipeline on Windows by running with the /Renderer=gl command-line flag.

There is a lot of stuff broken, or missing, or causing crashes! This is definitely not ready for actual use, but I do want to start a conversation about how to keep this more closely in line with the work on master so I can avoid future rebasing headaches after major refactorings.

Note: All the X11/Linux client stuff has been stripped out here, this is just the OpenGL rendering pipeline.

@dpogue dpogue force-pushed the wingl branch 2 times, most recently from 3f0f60b to ab44da2 Compare July 5, 2022 03:00
@dpogue dpogue force-pushed the wingl branch 4 times, most recently from 9d561fa to e93306f Compare January 2, 2023 23:02
@dpogue dpogue force-pushed the wingl branch 2 times, most recently from a16b01e to cf632a6 Compare February 6, 2023 02:46
@dpogue dpogue force-pushed the wingl branch 3 times, most recently from 66b4eeb to a8d63c2 Compare February 21, 2023 05:00
@dpogue dpogue force-pushed the wingl branch 4 times, most recently from 919a8a4 to 4f1c07c Compare March 12, 2023 21:43
@dpogue dpogue force-pushed the wingl branch 2 times, most recently from e328950 to 1c73113 Compare April 4, 2023 04:55
@dpogue dpogue force-pushed the wingl branch 2 times, most recently from 184c487 to 53f655f Compare April 11, 2023 03:53
dpogue and others added 29 commits August 8, 2024 02:08
Adding support for both front face and back face culling. Plasma mixes both.
This should fix things like the fire marbles in Neighborhood. Those
objects contain physics bodies that render as transparent, but were
still contributing to the Z buffer and sometimes blocking other
textures. This borrows from the DX renderer, where transparent bodies
are not rendered. That also keeps them from contributing to the
Z-buffer.
This should solve z-fighting in transparent textures. I haven't compared
against DX so it's a bit of a guess, but fragments that are completely
transparent should probably be discarded. This was causing z-fighting to
occur with transparent materials that were overlapped on each other.
Commonly seen in the "HeekD'nji" material in "Neighborhood."
The GetOpacity based culling needed some more conditions, it was doing
things like not rendering the fountain in Eder Kemo. That should be
resolved now, and the fire marbles are still fixed.

The alpha threshold change caused unresolvable issues in Eder Kemo.
Undoing for now. I'll have to figure out a better way to fix that
hologram.
The DX version sets a really low threshold, but doesn’t actually set it
to zero for when blending is enabled. Actual line from the DirectX is:

    fD3DDevice->SetRenderState(D3DRS_ALPHAREF, 0x00000001);

This should fix things like the hologram in the neighborhood, and
doesn’t break other things like blending in Eder Kemo.
Directional lights in plasma are a global light vector. The lighting
algorithm expects the vector to the light, so the global light vector
needs to be reversed for accurate lighting.
This is what calls `Eval()` to make layer animations work, so that's now
hooked up for plGLPipeline. I don't love this approach because it feels
weird doing it in the shader class, and I suspect we need to know about
layer overrides when the shader is being generated, but... for now it
sorta works.
This enables the loading bars and console.
Now it just leaks an absurd amount of memory rather than crashing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants