mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 23:11:49 +00:00
add emission gbuffer attachment
This commit is contained in:
parent
8a3306ed41
commit
5ec9f14021
12 changed files with 101 additions and 31 deletions
|
|
@ -16,7 +16,7 @@ vec4 effect() {
|
|||
vec3 normal = transpose(mat3(u_view)) * texture(u_normal, v_uv).xyz;
|
||||
vec3 dir = modelpos.xyz - u_cameraPos;
|
||||
#ifdef ENABLE_SHADOWS
|
||||
ssao *= calc_shadow(modelpos, normal, length(pos));
|
||||
ssao *= max(calc_shadow(modelpos, normal, length(pos)), texture(u_emission, v_uv).r);
|
||||
#endif
|
||||
vec3 fogColor = texture(u_skybox, dir).rgb;
|
||||
float fog = calc_fog(length(u_view * vec4((modelpos.xyz - u_cameraPos) * FOG_POS_SCALE, 0.0)) / 256.0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue