illwieckz · GitHub

Commits on Jan 17, 2025

  1. Add r_forceRendererTime

    When set to >= 0, the value of this cvar (in milliseconds) will be used for time-based shader effects.
    Configuration menu

    Browse the repository at this point in the history

  2. Change u_Color to uint

    `u_Color` was a vec4 that was being set from a `Color` object, which only has 8-bit precision per colour, so using up 4 times more memory than that to transfer it was quite atrocious. Instead, pack it into a uint32_t, then use `unpackUnorm4x8()` to unpack in the shader.
    Also adds a macro for unpacking for hardware that doesn't support `GL_ARB_gpu_shader5`.
    Configuration menu

    Browse the repository at this point in the history

  3. Add a uint version of u_ColorModulate

    Add `u_ColorModulateColorGen` for use with shaders other than `cameraEffects`, since the latter can get an arbitrary vec4 for it. All other shaders only use 12 distinct states of `u_ColorModulateColorGen`, encoded as 5 bits. Also adds `u_ColorModulateLightFactor` as a global uniform, to be able to put the `genericMaterial` shader struct into 8 bytes.
    Fixes an issue with material shader post-processing that was removing global uniforms that had similar names to a non-global one.
    Configuration menu

    Browse the repository at this point in the history

  4. Configuration menu

    Browse the repository at this point in the history

  5. Configuration menu

    Browse the repository at this point in the history

  6. Configuration menu

    Browse the repository at this point in the history

  7. Configuration menu

    Browse the repository at this point in the history

Read the original on github.com ↗