Fully fixed sub-voxel noise issue

This commit is contained in:
Joshua Barretto 2020-04-23 22:05:14 +01:00
parent c0bd0279fc
commit 1c2f05ac51

View File

@ -45,7 +45,7 @@ void main() {
diffuse_light *= f_light * ao;
diffuse_light += point_light * ao;
vec3 col = f_col + hash(vec4(floor(f_chunk_pos * 3.0 + 0.01), 0)) * 0.02; // Small-scale noise
vec3 col = f_col + hash(vec4(floor(f_chunk_pos * 3.0 - f_norm * 0.5), 0)) * 0.02; // Small-scale noise
vec3 surf_color = illuminate(srgb_to_linear(col), light, diffuse_light, ambient_light);
float fog_level = fog(f_pos.xyz, focus_pos.xyz, medium.x);