Skip to content
Snippets Groups Projects

Resolve "Voxel cone tracing"

Merged Ghost User requested to merge 82-voxel-cone-tracing into develop
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
@@ -115,6 +115,10 @@ glm::mat4 computeShadowViewProjectionMatrix(
getMinMaxView(voxelVolumeCorners);
glm::vec3 scale = glm::vec3(2) / (maxView - minView);
// rotationaly invariant to avoid swimming when moving camera
scale = glm::vec3(glm::max(glm::max(scale.x, scale.y), scale.z));
glm::vec3 offset = -0.5f * (maxView + minView) * scale;
glm::mat4 crop(1);
Loading