Skip to content

New sampler concepts#1058

Open
karimsayedre wants to merge 12 commits intomasterfrom
new-sampler-concepts
Open

New sampler concepts#1058
karimsayedre wants to merge 12 commits intomasterfrom
new-sampler-concepts

Conversation

@karimsayedre
Copy link
Copy Markdown
Contributor

addressing comment from PR #1001

…gle Sampler global like its Triangle counterpart, we need to keep the basis around
…local coordinate system) already given and fixed.

This way we can share computation between Solid Angle and Projected Solid Angle calculations

Also apply the `abs` fix from the triangle
…actical Warps are broken wrong weight was getting returned and MIS weights were inconsistent.

They're broken now, NaN returned as the backwardWeight
always move the scalar multiplication of a vector in a dot product outside the dot product
const angle_t hAngle = degrees(__wrapPhi(polar.phi, symmetry));

#define NBL_IES_DEF_ANGLE_ACC(T, EXPR) struct T { using value_type = angle_t; accessor_t acc; value_type operator[](uint32_t idx) NBL_CONST_MEMBER_FUNC { return EXPR; } };
#define NBL_IES_DEF_ANGLE_ACC(T, EXPR) struct T { using value_type = angle_t; accessor_t acc; value_type operator[](uint32_t idx) NBL_CONST_MEMBER_FUNC { return EXPR; } void get(uint32_t idx, NBL_REF_ARG(value_type) val) NBL_CONST_MEMBER_FUNC { val = EXPR; } };
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manually test the IES viewer didn't break

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already did :)

{
vector_t3 retval = hemisphere_t::__generate(u.xy);
const bool chooseLower = u.z > T(0.5);
const bool chooseLower = u.z > scalar_type(0.5);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_static_cast

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced all using a regex with VS Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants