Skip to content

Commit ff60350

Browse files
committed
fix a regression caused by the previous commit
1 parent 784e7ea commit ff60350

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/emitters/sunsky.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ class SunskyEmitter final : public Emitter<Float, Spectrum> {
620620

621621
Spec c1 = 1 + coefs[0] * dr::exp(coefs[1] / (cos_theta + 0.01f));
622622
Spec chi = (1 + cos_gamma_sqr) /
623-
dr::pow(1 + dr::square(coefs[8]) - 2 * coefs[8] * cos_gamma, 1.5);
623+
dr::pow(1 + dr::square(coefs[8]) - 2 * coefs[8] * cos_gamma, 1.5f);
624624
Spec c2 = coefs[2] + coefs[3] * dr::exp(coefs[4] * gamma) +
625625
coefs[5] * cos_gamma_sqr + coefs[6] * chi +
626626
coefs[7] * dr::safe_sqrt(cos_theta);

src/shapes/sdfgrid.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
#include <drjit/texture.h>
1616

1717
#if defined(MI_ENABLE_EMBREE)
18-
#include <embree3/rtcore.h>
18+
# include <embree3/rtcore.h>
1919
#endif
2020

2121
#if defined(MI_ENABLE_CUDA)
22-
#include "optix/sdfgrid.cuh"
22+
# include "optix/sdfgrid.cuh"
2323
#endif
2424

2525
NAMESPACE_BEGIN(mitsuba)
@@ -164,8 +164,9 @@ class SDFGrid final : public Shape<Float, Spectrum> {
164164
if (tensor->shape(3) != 1)
165165
Throw("SDF grid shape at index 3 is %lu, expected 1",
166166
tensor->shape(3));
167-
m_grid_texture = InputTexture3f(*tensor, true, true,
168-
dr::FilterMode::Linear, dr::WrapMode::Clamp);
167+
m_grid_texture = InputTexture3f(
168+
(const typename InputTexture3f::TensorXf &) *tensor,
169+
true, true, dr::FilterMode::Linear, dr::WrapMode::Clamp);
169170
} else {
170171
Throw("The SDF values must be specified with either the "
171172
"\"filename\" or \"grid\" parameter!");

src/textures/bitmap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ class BitmapTextureImpl : public Texture<Float, Spectrum> {
865865
ScalarFloat value = ptr[i];
866866
if (init_distr)
867867
*out++ = value;
868-
m_mean += value;
868+
mean += value;
869869
range_issue |= value < 0 || value > 1;
870870
}
871871
m_mean = mean / pixel_count;

0 commit comments

Comments
 (0)