mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 07:21:51 +00:00
add 'sky_tint', 'clouds_tint', 'min_sky_light' weather parameters
This commit is contained in:
parent
1194379f99
commit
e037462615
22 changed files with 80 additions and 31 deletions
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
#include <constants>
|
||||
|
||||
vec3 pick_sky_color(samplerCube cubemap, float dayTime) {
|
||||
vec3 pick_sky_color(samplerCube cubemap, float dayTime, vec3 minSkyLight) {
|
||||
float elevation = sin(dayTime * PI2) * 0.2;
|
||||
vec3 skyLightColor = texture(cubemap, vec3(0.0f, elevation, -0.4f)).rgb;
|
||||
skyLightColor *= SKY_LIGHT_TINT;
|
||||
skyLightColor = min(vec3(1.0f), skyLightColor * SKY_LIGHT_MUL);
|
||||
skyLightColor = max(MIN_SKY_LIGHT, skyLightColor);
|
||||
skyLightColor = max(minSkyLight, skyLightColor);
|
||||
return skyLightColor;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue