-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch testrender to cone tracing #1543
Conversation
|
3bcae91
to
f195a9c
Compare
src/testrender/shading.cpp
Outdated
return Color3(c.x < min ? min : max < c.x ? max : c.x, | ||
c.y < min ? min : max < c.y ? max : c.y, | ||
c.z < min ? min : max < c.z ? max : c.z); | ||
return Color3(c.x < min ? min |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line looks like it got formatted a bit strangely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There are a few spots where it looks like clang-format had too narrow of a width that you might want to double check ...
Maybe, but that's the project configuration as far as I know. |
8d875d3
to
bfc9e6e
Compare
The idea is to stop propagating derivs through BSDFs, which we never did properly. Instead we trace rays with radius + spread, which we turn into OSL derivs in SG when we hit a surface. Then when bouncing off a surface we use the BSDF roughness to set the spread. In addition we also: * Return BSDF samples/eval as a small struct Sample(). This avoids output parameters in the methods. * Stop passing a full ShaderGlobals to the BSDF methods. Pass a viewing direction wo instead so they could run in a simpler context. Signed-off-by: Alejandro Conty <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry about the merge conflicts 😅
No problem! Thanks |
The idea is to stop propagating derivs through BSDFs, which we never did properly. Instead we trace rays with radius + spread, which we turn into OSL derivs in SG when we hit a surface. Then when bouncing off a surface we use the BSDF roughness to set the spread. In addition we also: * Return BSDF samples/eval as a small struct Sample(). This avoids output parameters in the methods. * Stop passing a full ShaderGlobals to the BSDF methods. Pass a viewing direction wo instead so they could run in a simpler context. Signed-off-by: Alejandro Conty <[email protected]>
Relevant changes: * GPU string fix -- needed missing cast (AcademySoftwareFoundation#1553) * Fix typo error that prevented correct typecheck of ternary (AcademySoftwareFoundation#1552) * testrender now supports the standard MaterialX closure: * testrender improvements: modernize sampler (AcademySoftwareFoundation#1534), switch to cone tracing (AcademySoftwareFoundation#1543), support MaterialX closures (AcademySoftwareFoundation#1533, AcademySoftwareFoundation#1536, AcademySoftwareFoundation#1537, AcademySoftwareFoundation#1538, AcademySoftwareFoundation#1541, AcademySoftwareFoundation#1542, AcademySoftwareFoundation#1547) * Bump LLVM to 14.0 * Help reduce PTX nondeterminism (AcademySoftwareFoundation#1570) See merge request spi/dev/3rd-party/osl-feedstock!30
Description
The idea is to stop propagating derivs through BSDFs, which we
never did properly. Instead we trace rays with radius + spread,
which we turn into OSL derivs in SG when we hit a surface. Then
when bouncing off a surface we use the BSDF roughness to set the
spread. In addition we also:
avoids output parameters in the methods.
a viewing direction wo instead so they could run in a simpler
context.
Tests
Updated testrender tests because of very minimal diffs.
Checklist: