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
|
|
@ -6,6 +6,11 @@ float calc_torch_light(vec3 normal, vec3 modelpos) {
|
|||
* max(0.0, -dot(normal, normalize(modelpos - u_cameraPos)));
|
||||
}
|
||||
|
||||
vec3 calc_torch_light(vec3 light, vec3 normal, vec3 modelpos, vec3 torchLightColor, float gamma) {
|
||||
float torchlight = calc_torch_light(normal, modelpos);
|
||||
return pow(light + torchlight * torchLightColor, vec3(gamma));
|
||||
}
|
||||
|
||||
vec3 calc_screen_normal(vec3 normal) {
|
||||
return transpose(inverse(mat3(u_view * u_model))) * normal;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue