mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
fix
This commit is contained in:
parent
a6c4e9e22e
commit
86096553ce
3 changed files with 15 additions and 4 deletions
|
|
@ -7,13 +7,17 @@ uniform float u_weatherFogOpacity;
|
|||
uniform float u_weatherFogDencity;
|
||||
uniform float u_weatherFogCurve;
|
||||
|
||||
float calc_fog(float depth) {
|
||||
float calc_fog(float depth, float fogFactor, float fogCurve) {
|
||||
return min(
|
||||
1.0,
|
||||
max(pow(depth * u_fogFactor, u_fogCurve),
|
||||
max(pow(depth * u_fogFactor * fogFactor, u_fogCurve * fogCurve),
|
||||
min(pow(depth * u_weatherFogDencity, u_weatherFogCurve),
|
||||
u_weatherFogOpacity))
|
||||
);
|
||||
}
|
||||
|
||||
float calc_fog(float depth) {
|
||||
return calc_fog(depth, 1.0, 1.0);
|
||||
}
|
||||
|
||||
#endif // FOG_GLSL_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue