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

Better flat visibility checks for Ortho projection. #2905

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dileepvr
Copy link
Contributor

Using sign of dot-product between view vector and flat normal to determine orthographic-projection visibility for flats, instead of the default ZatPoint() height check.

@RicardoLuis0
Copy link
Collaborator

do you have a wad i can use to test these changes?

@dileepvr
Copy link
Contributor Author

viewpos_3rdperson.zip
Here. Please bind mousewheel to zoom in/out in the controls segment.

@dileepvr
Copy link
Contributor Author

hmm. I just discovered that r_dithertransparency isn't working with 3d floors. I remember putting it in at some point.

@dileepvr
Copy link
Contributor Author

If this isn't getting in soon, can I pile on the OoB visual-portal-rendering commits into this PR? It touches the sacred files, meaning will require more extensive testing.

@RicardoLuis0
Copy link
Collaborator

yeah i've been busy with work and the bone manip branch, so haven't had much of a chance to test it yet, so feel free to add more stuff

…nts. SkyPortals will be stenciled, and will always use perspective projection. Disabled interpolation when portalgroup changes (portal transition occurs) if viewpoint is OoB (was necessary for fog of war when r_radarclipper is set to true). Tightened up radar clipper by making it more aggressive. Voided walls wont' get filled in by a floor or ceiling sky (because of the stencil). Ceiling sky will be half-infinitely tall upwards, and floor sky will be half-infinitely tall downwards. Use only floor skies and a good GLSKYBOX for top-down/isometric cameras. Level.ReplaceTextures("F_SKY1", "SKY1", TexMan.NOT_FLOOR); (zscript) is a nice trick for WorldLoaded().
@dileepvr
Copy link
Contributor Author

dileepvr commented Feb 12, 2025

viewpos_3rdperson_2.zip
Test pk3. Please bind mousewheel to zoom in/out in the controls segment.

LinePortals and skyportals now render in OoB viewpoints. Sky will be stenciled (so textureless walls don't get filled in). Still no sector-portal rendering (sky in floor works though). I also disabled interpolation for the moment when portalgroup changes (a vague proxy for portal transition) for OoB viewpoints. radarclipper fog-of-war was acting up otherwise, revealing unexplored rooms when I go through a portal and come back.

Sky example: https://youtu.be/fL2okDsv-BA

…o create a new type of portal stencil for the HWPlaneMirrorPortal. Stacked sector portals could be made to work the same way, but there are clipper issues, revealing out-of-view sections of the map on the other side. Hence sector portal rendering is still disabled in OoB viewpoints.
@dileepvr
Copy link
Contributor Author

viewpos_3rdperson_3.zip
Made reflective floors and ceilings work with OoB too.
Giving up on stacked sector portals visual rendering. That remains the last holdout compared to regular viewpoints.

@dileepvr
Copy link
Contributor Author

viewpos_3rdperson_4.zip
Found some inspiration to finish this. Had to make Portal Stencils planar.
Stacked sectors now render in OoB viewpoints. That was the last of them. Anything in this engine now renders in all viewpoints.

@RicardoLuis0
Copy link
Collaborator

i'll try to test this PR during the coming weekend 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants