Skip to content
Snippets Groups Projects

Resolve "Complete Voxelization"

Merged Ghost User requested to merge 81-complete-voxelization into develop
@@ -35,6 +35,9 @@ void main() {
@@ -35,6 +35,9 @@ void main() {
}
}
uint flatIndex = flattenVoxelUVToIndex(UV, voxelImageSize);
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));
atomicMax(packedVoxelData[flatIndex], packVoxelInfo(color));
}
}
 
\ No newline at end of file
Loading