Skip to content

Commit

Permalink
Fix bug in envmap that would create a horizontal seam in JIT variants
Browse files Browse the repository at this point in the history
  • Loading branch information
njroussel committed Dec 20, 2022
1 parent 10d3514 commit 7bf132f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emitters/envmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class EnvironmentMapEmitter final : public Emitter<Float, Spectrum> {

if constexpr (dr::is_jit_v<Float>) {
// Enforce horizontal continuity
UInt32 row_index = dr::arange<UInt32>(res.y());
UInt32 row_index = dr::arange<UInt32>(res.y()) * res.x();
Vector4f v0 = dr::gather<Vector4f>(m_data.array(), row_index);
Vector4f v1 = dr::gather<Vector4f>(m_data.array(), row_index + (res.x() - 1));
Vector4f v01 = .5f * (v0 + v1);
Expand Down

0 comments on commit 7bf132f

Please sign in to comment.