Super exciting stuff, having this kind of control over camera lenses in Blender is easily game changing. One thing that occurs to me, though, while Optix does technically support OSL, this is…
LGTM, the only thing I noticed is that in theory osl_div_m_ff
now needs 16 extra multiplications, but hopefully the compiler should be smart enough to inline and optimize away 0.0f * f
and 1.0f * f
.
Seems reasonable to me to only use RT if the hardware explicitly supports it, assuming this is always reported accurately.
Yeah, also fine with me, I assume you approve the PR?
Yeah, the test failures are expected, I'll update them when landing.
Good point, I added it (and found a bug while doing so!)
Seems reasonable to me overall. We can also add versioning code to make older files behave correctly, so this would only break forward compatibility (and I think this is a case where it's justified).
Yeah, I'm not super happy with it either - I mostly wanted to make it clear that it's just for reference, not an active part of Cycles itself. scripts
sounds good.
True, I've renamed it to spherical_ellipse_sample_phi
.
Update:
- Implemented CDF remapping and reduced size to 64x64
- I've used a basic x^4 remapping for both axes for now, this appears to be the ideal balance between complexity, max error and…