Skip to content

Rend2 SP - #1179

Draft
SomaZ wants to merge 210 commits into
JACoders:masterfrom
SomaZ:rend2-unified-wip
Draft

SomaZ wants to merge 210 commits into
JACoders:masterfrom
SomaZ:rend2-unified-wip

Conversation

@SomaZ

@SomaZ SomaZ commented Oct 8, 2023

Copy link
Copy Markdown
Member

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.
SomaZ and others added 12 commits June 24, 2026 23:12
…table (#67)

* [rend2] Fix gore buffer incorrectly using `glBufferSubData` when immutable

* [rend2] Unmap the gore buffer on shutdown when immutable

* [rend2] Missing preprocessor guards
* [rend2] Fix dissolve wipes

* [rend2] No flags for common dissolve
Don't shuffle lightmap and diffuse stage if the lightmap stage is dependent on the depth write of the first stage.
JOs default is overbrightbits 1. Maps looked very dark without this change.
@SomaZ
SomaZ force-pushed the rend2-unified-wip branch from d316917 to 792feb5 Compare July 12, 2026 19:57
SomaZ added 17 commits July 12, 2026 21:57
Adds a cvar to adjust chromatic aberration effect strength when refractive surfaces are drawn.
Those were all put into ubos some time ago, so no need for them to exist anymore in this form.
…FrameNumber

Just mark the gore data as cached when its actually drawn.
Doesn't readback the depthbuffer anymore to determain if a flare is visable or not. It will now test depth in the vertex shader that is running for the flare and creates degenerate triangles if it's concidered to be occluded.
It always used the approximation that is used for worldsurfaces instead of using the lightgrid info.
A single break; prevented the code to fill the new indices past the first mergable surface. Also using R_CreateIBO now to get debug names.
This should not have any impact on performance but enables models with alot more bones than it did before. Bones are tightly packed in the ubo, we really just need to stay under the 16KiB UBO block size limit.
Fixes: #70
Also makes sure that vertex lit surfaces are assigned to a lightall pass for dlights to work on them reliably.
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