Skip to content

Conversation

@SomaZ
Copy link
Member

@SomaZ SomaZ commented Oct 8, 2023

So, this is basically a SP port of rend2. This also puts most of the rend2 code to the shared folder. I also started reducing the differences between SP and MP renderer APIs but I think I can do some more, so just a draft for now. This also needs testing.

Many thanks to @AntiAnti for doing the initial SP port and for the additions to the weather code.

@Razish Razish mentioned this pull request Oct 11, 2023
@xycaleth xycaleth mentioned this pull request Nov 12, 2023
SomaZ and others added 27 commits December 12, 2023 16:48
Theres a define in MP that clashes, so it was renamed in MP. Apply this to vanilla too.

Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
q_shared.h defines "int COM_GetCurrentParseLine( void )"

q_shared.cpp implemented "int COM_GetCurrentParseLine( int index )"

Fixed now, so function can actually be used.

Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
Adding mdr structs, one more texture compression algorithm, some zone tags, and SkipBracedSection function

Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
Cleaned up alot of noise. Code formating will happen in another commit.
All work based on: https://github.com/AntiAnti/OpenJK

Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
Chose the SP variant of this to get rid of the void pointer in the struct, so potentially less casting.
cg_showtris 1 shouldnt use depth culling. Had overseen this before.
The saber marks in SP use some additional scaling and there's some missing parts still.

Also fixed incorrect ifdeffed if else constructs.
Added working IsShaking

Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
Because there's a skyportal in this map, it always culled all the ui elements because they aren't sky surfaces.
when G2_PERFORMANCE_ANALYSIS
Compiles, haven't tested it though
You can now load yavin_swamp again.
except for the ones that need info about the entity time or have the volumetric flag.
Fixed dynamic lights when r_specularMapping and r_normalmapping == 0.
Also removed specular calculations when r_specularMapping 0 but r_normalmapping 1.
@SomaZ SomaZ force-pushed the rend2-unified-wip branch from 55fd784 to 616ade6 Compare March 2, 2025 12:44
SomaZ added 2 commits March 2, 2025 16:15
Also stencil buffer is not needed for refractive surfaces
Added debug group annotations and better shader names for captures with debug software like renderdoc.
@SomaZ SomaZ force-pushed the rend2-unified-wip branch from b549e37 to d36ea14 Compare March 3, 2025 21:00
SomaZ added 7 commits March 4, 2025 21:14
Prevents drawing a giant blob shadow beneath players when cg_shadows 4 is set after loading a map without it being active.
Drawing the sky is somewhat special as we need to draw every surface and its stages in order. The tesselator for the sky often creates overlaps and this leads to doulbe and tripple applied stages with our usual sorting. Also, all other surfaces in the same sort as the sky need to be rendered after the sky has been rendered.
Fixes incorrectly displayed models and incorrectly discarded models.
SomaZ added 12 commits June 28, 2025 08:58
Disabling and enabling parallax mapping is not latched anymore and happens directly when setting the cvar.
Turns out, it breaks things and I was wrong with my assumption that we can merge all of those surface entities.

Fixes #63
Also fixes sun flare rendering
It seems to be completely unused in SP though.
Theres some optimizations for the prepass to merge more surfaces which works fine for opaque shaders and remaps that are also opaque. When changing to transparent shaders those optimization didnt work properly as they didnt know about the remap. Remapping now happens when drawsurfaces are added and not when drawing of the surfaces starts.
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.

1 participant