More gles fixes

This commit is contained in:
luboslenco
2024-11-15 23:25:06 +01:00
parent ede19ee6da
commit 5ce3ae29ba
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ float trace_cone_ao(sampler3D voxels, const vec3 origin, vec3 dir, const float a
sample_pos = dir * dist + origin;
float mip = max(log2(diam * voxelgi_resolution), 0.0);
float mip_sample = textureLod(voxels, sample_pos * vec3(0.5, 0.5, 0.5) + vec3(0.5, 0.5, 0.5), mip).r;
sample_col += (1 - sample_col) * mip_sample;
sample_col += (1.0 - sample_col) * mip_sample;
dist += max(diam / 2.0, VOXEL_SIZE);
diam = dist * aperture;
}
+1 -1
View File
@@ -251,7 +251,7 @@ void main() {
envl /= PI;
vec3 reflection_world = reflect(-v, n);
float lod = mip_from_roughness(roughness, envmap_num_mipmaps);
float lod = mip_from_roughness(roughness, float(envmap_num_mipmaps));
vec3 prefiltered_color = textureLod(senvmap_radiance, envmap_equirect(reflection_world, envmap_data.x), lod).rgb;
envl.rgb *= albedo;