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:
parent
6ad43575ff
commit
2fd22c1850
12 changed files with 417 additions and 70 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue