diff options
| author | ModMaker101 <119018978+ModMaker101@users.noreply.github.com> | 2026-03-05 14:41:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 02:41:17 +0700 |
| commit | cbcf3de358f97ae1f687f3ffa47fcdb910e39bcb (patch) | |
| tree | 35e2e226b669496319c978d026045b0ebe91ef89 /Minecraft.Client/GameRenderer.h | |
| parent | 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (diff) | |
Fix gamma slider via pixel shader #178 (#481)
* Fix gamma slider via pixel shader #178
* LCE-like gamma using postprocess shader
Diffstat (limited to 'Minecraft.Client/GameRenderer.h')
| -rw-r--r-- | Minecraft.Client/GameRenderer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Minecraft.Client/GameRenderer.h b/Minecraft.Client/GameRenderer.h index 1db7713a..70fbe8b3 100644 --- a/Minecraft.Client/GameRenderer.h +++ b/Minecraft.Client/GameRenderer.h @@ -1,4 +1,9 @@ #pragma once + +#ifdef _WIN64 +#include <d3d11.h> +#endif + class Minecraft; class Entity; class Random; @@ -72,6 +77,14 @@ private: float darkenWorldAmount; float darkenWorldAmountO; + // Gamma caching + float m_cachedGammaPerPlayer[NUM_LIGHT_TEXTURES]; + static float ComputeGammaFromSlider(float slider0to100); + void CachePlayerGammas(); + void ApplyGammaPostProcess() const; + bool ComputeViewportForPlayer(int j, D3D11_VIEWPORT& outViewport) const; + uint32_t BuildPlayerViewports(D3D11_VIEWPORT* outViewports, float* outGammas, UINT maxCount) const; + bool isInClouds; float m_fov; |
