mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 07:21:51 +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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue