fix: skybox is not visible behind translucent blocks

This commit is contained in:
MihailRis
2025-07-25 22:28:28 +03:00
parent 705e398bc3
commit 7cf073f079
14 changed files with 183 additions and 96 deletions
+1 -8
View File
@@ -1,14 +1,7 @@
#ifndef COMMONS_GLSL_
#define COMMONS_GLSL_
#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;
}
#include <constants>
vec3 apply_planet_curvature(vec3 modelPos, vec3 pos3d) {
modelPos.y -= pow(length(pos3d.xz) * CURVATURE_FACTOR, 3.0f);