diff --git a/projects/voxelization/resources/shaders/voxelization.frag b/projects/voxelization/resources/shaders/voxelization.frag index fe2b6a0ac9b443145735085a20a3c8cee4012e3c..e745cf2a4440da8cc3d88bbf0e72377f26c72e6e 100644 --- a/projects/voxelization/resources/shaders/voxelization.frag +++ b/projects/voxelization/resources/shaders/voxelization.frag @@ -6,9 +6,9 @@ #include "perMeshResources.inc" #include "lightInfo.inc" -layout(location = 0) in vec3 passPos; -layout(location = 1) out vec2 passUV; -layout(location = 2) in vec3 passN; +layout(location = 0) in vec3 passPos; +layout(location = 1) in vec2 passUV; +layout(location = 2) in vec3 passN; layout(set=0, binding=0, std430) buffer voxelizationBuffer{ uint packedVoxelData[]; @@ -40,11 +40,8 @@ void main() { return; } uint flatIndex = flattenVoxelUVToIndex(UV, voxelImageSize); - - // 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 albedo = textureLod(sampler2D(albedoTexture, textureSampler), passUV, 10.f).rgb; + + vec3 albedo = texture(sampler2D(albedoTexture, textureSampler), passUV).rgb; vec3 N = normalize(passN); float NoL = clamp(dot(N, lightInfo.L), 0, 1);