Skip to content
Snippets Groups Projects
Commit 8dc28d6e authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#81] Fix voxelization color

parent 5934e545
No related branches found
No related tags found
1 merge request!68Resolve "Complete Voxelization"
Pipeline #25853 passed
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment