mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 15:31:49 +00:00
fix: skybox is not visible behind translucent blocks
This commit is contained in:
parent
705e398bc3
commit
7cf073f079
14 changed files with 183 additions and 96 deletions
14
res/shaders/lib/sky.glsl
Normal file
14
res/shaders/lib/sky.glsl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef COMMONS_SKY_
|
||||
#define COMMONS_SKY_
|
||||
|
||||
#include <constants>
|
||||
|
||||
vec3 pick_sky_color(samplerCube cubemap) {
|
||||
vec3 skyLightColor = texture(cubemap, vec3(0.4f, 0.0f, 0.4f)).rgb;
|
||||
skyLightColor *= SKY_LIGHT_TINT;
|
||||
skyLightColor = min(vec3(1.0f), skyLightColor * SKY_LIGHT_MUL);
|
||||
skyLightColor = max(MIN_SKY_LIGHT, skyLightColor);
|
||||
return skyLightColor;
|
||||
}
|
||||
|
||||
#endif // COMMONS_SKY_
|
||||
Loading…
Add table
Add a link
Reference in a new issue