Skip to content

Commit 5561f39

Browse files
committed
Minor fixes
1 parent cf684d1 commit 5561f39

File tree

44 files changed

+124
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+124
-119
lines changed

internal/CoreRef.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3610,6 +3610,9 @@ void Ray::Ref::SampleLightSource(const fvec4 &P, const fvec4 &T, const fvec4 &B,
36103610
ls.ray_flags = l.ray_visibility;
36113611
}
36123612

3613+
if (hsum(ls.col) < FLT_EPS) {
3614+
ls.pdf = 0.0f;
3615+
}
36133616
ls.pdf /= factor;
36143617
}
36153618

internal/CoreSIMD.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5931,6 +5931,8 @@ void Ray::NS::SampleLightSource(const fvec<S> P[3], const fvec<S> T[3], const fv
59315931
++index;
59325932
}
59335933

5934+
const ivec<S> temp_mask = simd_cast((ls.col[0] + ls.col[1] + ls.col[2]) < FLT_EPS);
5935+
where(ray_mask & temp_mask, ls.pdf) = 0.0f;
59345936
where(ray_mask, ls.pdf) /= factor;
59355937
}
59365938

internal/shaders/output/shade_primary_atlas.comp.cso.inl

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/shaders/output/shade_primary_atlas.comp.spv.inl

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/shaders/output/shade_primary_atlas_cache_query.comp.cso.inl

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/shaders/output/shade_primary_atlas_cache_query.comp.spv.inl

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/shaders/output/shade_primary_atlas_cache_query_sky.comp.cso.inl

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/shaders/output/shade_primary_atlas_cache_query_sky.comp.spv.inl

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/shaders/output/shade_primary_atlas_cache_update.comp.cso.inl

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/shaders/output/shade_primary_atlas_cache_update.comp.spv.inl

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)