diff --git a/projects/voxelization/resources/shaders/voxelization.frag b/projects/voxelization/resources/shaders/voxelization.frag index 7ea161ce4f5a4d59bb3d50c78553df0dfb5ab4ec..e29e0ff185e40eb97c74dcffa6084f369dd8f803 100644 --- a/projects/voxelization/resources/shaders/voxelization.frag +++ b/projects/voxelization/resources/shaders/voxelization.frag @@ -35,6 +35,9 @@ void main() { } uint flatIndex = flattenVoxelUVToIndex(UV, voxelImageSize); - vec3 color = texture(sampler2D(albedoTexture, textureSampler), passUV).rgb; + // for some reason the automatic mip level here does not work + // biasing does not work either + // as a workaround a fixed, high mip level is chosen + vec3 color = textureLod(sampler2D(albedoTexture, textureSampler), passUV, 10.f).rgb; atomicMax(packedVoxelData[flatIndex], packVoxelInfo(color)); } \ No newline at end of file