Seems overall reasonable to me, virtual functions are definitely nicer.
I'd make this a non-static function and add a (static) write_task
wrapper in ZstdWriteBlockTask that essentially just casts userdata to a ZstdWriteBlockTask
and calls task->ww->write_task(task)
.
Not sure what the code style policy is here, but I'm personally not a big fan of a static
overload of a function that's part of the public interface. I'd prefer something like an _impl
suffix here.
This is caused by the compact differential representation that was added a while ago to help with GPU memory usage.
With OSL, the full dPdx/dPdy differentials are tracked in ShaderGlobals
, so…
Clamping Base Color makes sense, for Emission I wouldn't do it - Emission naturally supports any positive value, while reflectivity (in a physically based renderer) is inherently limited to 0..1.
Sorry, the line number got messed up here. I meant subsurface_weight
.
Sorry, the line number got messed up here. I meant the specular_tint
.