1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

Fixes and proper tangent space

This commit is contained in:
Gefüllte Taubenbrust 2024-11-11 17:07:52 +01:00
parent 6ad43575ff
commit 2fd22c1850
12 changed files with 417 additions and 70 deletions

View file

@ -53,7 +53,7 @@ float sampleVolumetricLight(vec2 uv, vec3 lightVec, float rawDepth)
// We use the depth map to approximate the effect of depth on the light intensity.
// The exponent was chosen based on aesthetic preference.
// To make this phsyically accurate, the brightness here should scale linearly with depth,
// but this would make the godrays either too faint or too strong in many cases.
// but this would make the godrays either too faint or too strong in many cases.
return result / samples * pow(texture2D(depthmap, uv).r, 128.0);
#else
return result / samples;