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

Rend2 SP #1179

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

Rend2 SP #1179

wants to merge 104 commits into from

Commits on Dec 12, 2023

  1. Configuration menu
    Copy the full SHA
    a3aa7dd View commit details
    Browse the repository at this point in the history
  2. [vanilla] LS_NONE -> LS_LSNONE

    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>
    SomaZ and AntiAnti committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    07ab3b0 View commit details
    Browse the repository at this point in the history
  3. COM_GetCurrentParseLine fix

    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>
    SomaZ and AntiAnti committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    99a8eec View commit details
    Browse the repository at this point in the history
  4. Prepare qcommon and rd-common

    Adding mdr structs, one more texture compression algorithm, some zone tags, and SkipBracedSection function
    
    Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
    SomaZ and AntiAnti committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    c27c4b4 View commit details
    Browse the repository at this point in the history
  5. Patch rend2 for sp

    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>
    SomaZ and AntiAnti committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    33045e1 View commit details
    Browse the repository at this point in the history
  6. Move mp rend2 to shared folder

    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    3b7df7a View commit details
    Browse the repository at this point in the history
  7. [SP] rit.Malloc -> rit.Z_Malloc

    To match MP
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    bef35ee View commit details
    Browse the repository at this point in the history
  8. [MP] Get rid of _skinSurface_t

    Chose the SP variant of this to get rid of the void pointer in the struct, so potentially less casting.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    76f8b6c View commit details
    Browse the repository at this point in the history
  9. [Rend2] Fix cg_showtris depthtest

    cg_showtris 1 shouldnt use depth culling. Had overseen this before.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    a8b019a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9c85f09 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b43770d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0397ddb View commit details
    Browse the repository at this point in the history
  13. [rend2] make sp renderer use the shared rend2 files

    ifdefed sp / mp differences
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    a12a5a0 View commit details
    Browse the repository at this point in the history
  14. Remove duplicate files

    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    7464c90 View commit details
    Browse the repository at this point in the history
  15. Fix incorrect texture coordnates

    The saber marks in SP use some additional scaling and there's some missing parts still.
    
    Also fixed incorrect ifdeffed if else constructs.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    e05b65a View commit details
    Browse the repository at this point in the history
  16. [rend2] WIP Weather functions

    Added working IsShaking
    
    Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
    SomaZ and AntiAnti committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    ef4da7b View commit details
    Browse the repository at this point in the history
  17. [rend2-sp] Fix broken endscreen yavin2

    Because there's a skyportal in this map, it always culled all the ui elements because they aren't sky surfaces.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    5e34341 View commit details
    Browse the repository at this point in the history
  18. [rend2-sp] Fix ParseSessions

    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    36d7672 View commit details
    Browse the repository at this point in the history
  19. [rend2-sp] Add missing G2 functions

    when G2_PERFORMANCE_ANALYSIS
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    12b51bf View commit details
    Browse the repository at this point in the history
  20. [rend2-sp] Add OpenJO cmake config

    Compiles, haven't tested it though
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    156d92a View commit details
    Browse the repository at this point in the history
  21. [rend2-sp] Add basic JO support

    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    c3bc53d View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0aaf13b View commit details
    Browse the repository at this point in the history
  23. [rend2] Increase max fog count

    You can now load yavin_swamp again.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    0f2c420 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    080de13 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    de7f309 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    4c11f83 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    0f7bbea View commit details
    Browse the repository at this point in the history
  28. [rend2] Add md3 animations back, just CPU for now

    Need to implement gpu vertex animations, but use the cpu fallback solution for now.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    05a2357 View commit details
    Browse the repository at this point in the history
  29. [rend2-sp] Fix ghoul2 saber marks

    Its drawing at least. Potentially missing extra SP features.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    8dbeb54 View commit details
    Browse the repository at this point in the history
  30. [rend2-sp] Enabling additional sp g2 gore features

    I have no idea what this does. Can't find a difference visually myself.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    ac4eb0e View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    5b035b5 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    6128f8e View commit details
    Browse the repository at this point in the history
  33. [SP] Increase REF_API_VERSION & UI_API_VERSION

    Changed the API a little to match better between SP and MP. See following commits
    6654638
    e40982b
    3ac87fd
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    077848e View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    a82a42c View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    0093a2b View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    98508ec View commit details
    Browse the repository at this point in the history
  37. [rend2] Init Uniforms for the splashScreenShader

    so we can use Free on the program without checking if everything has been allocated.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    030c784 View commit details
    Browse the repository at this point in the history
  38. [rend2-sp] Fix LA Goggles

    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    6db4a17 View commit details
    Browse the repository at this point in the history
  39. [rend2-sp] Fix fog assignments

    taspir2 and yavin_swamp now look correct too.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    1c0e11e View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    32c0fb1 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    b3e5f53 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    64a9266 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    3b966a4 View commit details
    Browse the repository at this point in the history
  44. [rend2] Fix depth writes for shaders with blendFunc & sort opaque

    Dont do that. GLS_DSTBLEND_BITS & GLS_SRCBLEND_BITS should be 0 for opaque objects that can write depth.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    293ccdc View commit details
    Browse the repository at this point in the history
  45. [rend2] Load weather images as SRGB in hdr lighting conditions

    Also fixes depth lookup for weather surfaces that have no downwards velocity because we wont divide by zero anymore.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    5d0191b View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    9ae08ab View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    35b799f View commit details
    Browse the repository at this point in the history
  48. [SP/MP] Match most of tr_types.h

    Flags and structs should match perfectly now. Also removes some miniRefEntity structs from MP that aren't used and are also made useless already. So, just some cleanup in this regard.
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    51ff8fa View commit details
    Browse the repository at this point in the history
  49. [rend2] Fix compile after rebase

    Rebase obviously couldnt apply this change automatically, see:
    JACoders@e8454e3
    SomaZ committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    3cdbeee View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. Configuration menu
    Copy the full SHA
    fc77a23 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9ca479d View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Configuration menu
    Copy the full SHA
    cb5a8c1 View commit details
    Browse the repository at this point in the history
  2. [rend2] Reduce goreVBO size

    SomaZ committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    494abea View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

  1. [rend2] Fix alphaGen portal

    and some additional cleanup. Makes the entity ubo struct smaller, which is good. I unintentionally broke portal alphaGen when I rewrote the scene handling.
    
    u_LocalViewOrigin is not correct in any case anymore, because we can have the same entity in multiple views but we only upload one entity representation now. So we compute the needed vectors in the shaders in worldspace insted of localspace now.
    SomaZ committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    a257512 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. Configuration menu
    Copy the full SHA
    49adb74 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    15aae39 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5b6122 View commit details
    Browse the repository at this point in the history
  4. [rend2] Fix rendering misc_bsps

    It works as expected now. The model handle was simply incorrect.
    SomaZ committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    6994d4c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e09e1cb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    05415f8 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. [rend2] Fix out-of-bounds crash with weather

    Thanks @kuvirah for this fix.
    SomaZ committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    442abe3 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2024

  1. [rend2] Fix sprites related compiler warning

    rd-rend2/tr_bsp.cpp:4020:25: warning: comparison between NULL and non-pointer ('GLuint' (aka 'unsigned int') and NULL) [-Wnull-arithmetic]
    
    Thanks to @ensiform for reporing
    SomaZ committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    9a61f07 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. [rend2] Reset output in R_LoadHDRImage

    Fixes #59
    SomaZ committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    857fda5 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. Configuration menu
    Copy the full SHA
    33e276d View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. [rend2] Fix incorrect player light vector

    Broken since a257512
    SomaZ committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    c3c2e75 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Configuration menu
    Copy the full SHA
    f67f20e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4ea36f6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e477758 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5f0a58a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e996441 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. [rend2] Fix some compiler warnings

    Mostly unused variables
    SomaZ committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    f652863 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. Configuration menu
    Copy the full SHA
    b80f721 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b688bdf View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Configuration menu
    Copy the full SHA
    433837f View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. [rend2] Fix parallax mapping on alpha tested stages

    The parallax offset simply never got applied to the prepass, which created a mismatch between depth and actual stage rendering.
    SomaZ committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    7433777 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. Configuration menu
    Copy the full SHA
    08ad1d1 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. [rend2-sp] Fix precaching related memory leaks

    Gpu buffers, fbos, the gpu shaders and the image pool were allocated twice and leaking the second time... Looks like there's still something that leaks though.
    SomaZ committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    7c21d86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    90ee6f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. [rend2] Fix compiler warning

    // tr_shade.cpp @ 1549
    // hModel is an enum so this is not a valid check null arithmetic
    if (backEnd.currentEntity->e.hModel != NULL)
    
    Thanks to @ensiform for finding it
    SomaZ committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    e34bf59 View commit details
    Browse the repository at this point in the history
  2. [rend2] Update glext.h

    From the Khronos description about the "new" platform header
    
        The OpenGL headers all depend on the shared <KHR/khrplatform.h> header from the EGL Registry . This is a new dependency, introduced in OpenGL-Registry pull request 183 for increased compatibility between OpenGL and OpenGL ES headers.
    SomaZ committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    8fc4b24 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e656514 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    804c500 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    62a14d9 View commit details
    Browse the repository at this point in the history
  2. [rend2] Attempt at fixing UI scene rending on AMD

    Now there shouldn't be any attempts at updating UBOs while being used anymore.
    SomaZ committed May 1, 2024
    Configuration menu
    Copy the full SHA
    7c91d16 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c0ba7af View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9ff929c View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Configuration menu
    Copy the full SHA
    166e83b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    63599ed View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Configuration menu
    Copy the full SHA
    649a57f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d58063 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b86845c View commit details
    Browse the repository at this point in the history
  4. [rend2] Get rid of alphatest and glow shader permutations

    Those are handled via uniforms now. Less shaders to compile speeds up load times, having to switch less between glsl shaders speeds up ingame performance. Alphatest cases only commented out for now, will put these behind a cvar later, as some gpus might require to know if a discard can happen or not.
    
    [rend2] Fix sky glowing when last rendered surface had a glow stage
    SomaZ committed May 3, 2024
    Configuration menu
    Copy the full SHA
    97e902a View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. [rend2] Fixing shaders spriteUbo again

    it's an UNsigned integer, make sure to use unsigned integers...
    
    related bad fix:
    9a61f07
    SomaZ committed May 6, 2024
    Configuration menu
    Copy the full SHA
    1ac5652 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. [rend2] Fix korriban shaders with multiply blend stages

    Stages that are used to get some more detail shouldnt be collapsed with lighting because it will multiply lighting again and again which leads to incorrect darkening
    SomaZ committed May 13, 2024
    Configuration menu
    Copy the full SHA
    6029f91 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Configuration menu
    Copy the full SHA
    574197f View commit details
    Browse the repository at this point in the history
  2. [rend2] Fix surface sprites vertex colors behaviour

    Vanilla doesn't use rgbGens for surface sprites, only the approximated lighting from the emitting surfaces vertex colors.
    SomaZ committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    aac82ec View commit details
    Browse the repository at this point in the history
  3. [rend2-sp] Fix G2API_SetNewOrigin incorrect drop error

    Fixes #54
    
    Co-Authored-By: AntiAnti <17278566+antianti@users.noreply.github.com>
    SomaZ and AntiAnti committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    664bab7 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. [rend2] Fix dynamic lights on transparent surfaces

    Dynamic lights should also work on transparent surfaces that aren't sorted in the opaque sort bucket.
    SomaZ committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    836776a View commit details
    Browse the repository at this point in the history
  2. [rend2] Tweak default tonemap and exposure values

    Disabling autoexposure should give you a comparable image to the vanilla renderer. Now it does. Before it was way to dark in comparison.
    SomaZ committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    7adb2b1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7b1b63f View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. [rend2] Add special case for glow surfaces with sort < 2

    In vanilla this leads to glow being drawn but not the actual stage. So we mask the first render target in this case to achieve the same look. Currently having flickering issues with surfaces nearly perpendicular to the viewer and enabled msaa. This sometimes leads to fireflys and I have no idea why. Is this a driver issue or is this intended behaviour? Need to look into that.
    SomaZ committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    0d9700f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d7000f View commit details
    Browse the repository at this point in the history
  3. [rend2] Edit default auto exposure values

    I decided against overbrightening the screen like it did with the last edit.
    SomaZ committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    aa0b076 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Configuration menu
    Copy the full SHA
    7fa1089 View commit details
    Browse the repository at this point in the history