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

Skybox rendering #188

Merged
merged 23 commits into from
Dec 14, 2023
Merged

Skybox rendering #188

merged 23 commits into from
Dec 14, 2023

Commits on Nov 18, 2023

  1. Check config file version before attempting to load it (in future, mi…

    …gration could be attempted instead of throwing an error)
    stackotter committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    80f8b21 View commit details
    Browse the repository at this point in the history
  2. Don't overwrite invalid config until the user changes the fallback co…

    …nfig (to give them a chance to close the client and recover their config)
    stackotter committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    dd06337 View commit details
    Browse the repository at this point in the history
  3. Set current Config version to 0 (will only change it to 1 once things…

    … stabilise a bit)
    
    I've made the config version a Float so that we can increment it without
    ripping through versions too quickly.
    stackotter committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    b9dfce8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0b9430a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c693487 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. Configuration menu
    Copy the full SHA
    043b8d6 View commit details
    Browse the repository at this point in the history
  2. Move fog color/distance calculation into World to make it more reusab…

    …le (now bundled up in a Fog struct)
    stackotter committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    3ece840 View commit details
    Browse the repository at this point in the history
  3. Update sky color depending on time of day, and fix light map generation

    The light map was calculating brightness incorrectly by accidentally offsetting the
    sun angle by half a day.
    stackotter committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    70cc4e9 View commit details
    Browse the repository at this point in the history
  4. Render a sky plane when in the overworld and use exponential fog unde…

    …rwater (replicating GL_FOG_EXP)
    
    Took me ages to realise that OpenGL actually just has a built-in fog feature. I spent quite
    a while searching around the decompiled vanilla sources and shaders to find the exponential
    fog equation to no avail (before realising that it's actually just a documented built-in
    GL feature).
    
    The sky plane is rendered exactly how it is in Vanilla (or so I hope).
    stackotter committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    c27cea1 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Configuration menu
    Copy the full SHA
    519a3cb View commit details
    Browse the repository at this point in the history
  2. Render sunsets and sunrises as an angled dish (copying vanilla behavi…

    …our)
    
    It looks so nice :o
    stackotter committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    01965f3 View commit details
    Browse the repository at this point in the history
  3. Fix time of day calculations when doDaylightCycle is false (the serve…

    …r returns negative time when that's the case)
    stackotter committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    9867f37 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2023

  1. Change fog color to match the sunrise/sunset the more the player look…

    …s towards the sunrise/sunset
    stackotter committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    34a090c View commit details
    Browse the repository at this point in the history
  2. Fix parsing of fixed_time from dimension codec (accidentally attempte…

    …d to read as unsigned)
    
    This means that fixed time dimensions now have their sky/fog rendered correctly. The nether
    fog is now correctly the same color no matter the time in the overworld
    stackotter committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    0b05335 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6308b20 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    582ed14 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    50ff5ce View commit details
    Browse the repository at this point in the history
  6. Fix star blending mode to match Vanilla (emulating shining through fr…

    …om behind instead of being overlayed on top)
    stackotter committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    31012e8 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2023

  1. Calculate fog using camera ray instead of player ray so that fog is c…

    …orrect when in 3rd person
    
    Before this change, directional sunrise fog was incorrect when in camera 3, and you'd
    get water fog when the camera was above water but the player was below
    stackotter committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    79ee9c4 View commit details
    Browse the repository at this point in the history
  2. Fix fog for translucent objects by moving calculation from screen eff…

    …ect to chunk fragment shader
    stackotter committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    d84e221 View commit details
    Browse the repository at this point in the history
  3. Fix fog for translucent objects with OIT enabled (as best as possible)

    Still has a few issues, the main one being a weird color banding effect as the translucent
    geometry passes through the fog, but at a distance it's not quite as noticeable. Will need
    to revisit OIT at some point to make it a bit more accurate. Or alternatively I could just
    optimize regular translucency rendering with smarter sorting.
    stackotter committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    78bcf57 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. Render The End's textured sky box (a pixel-perfect match to vanilla 👌)

    Turns out it's just a 200x200x200 textured cube, the more you know. All the cool
    shimmery effects are just a result of Moire patterns.
    stackotter committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    0fa43c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    41e5990 View commit details
    Browse the repository at this point in the history