On shader changes, make sure these are uploaded in the cases where an expensive object rebuild isn't required #6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "boberfly/cycles:volume_shader"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
In Gaffer we found that on shader updates to volumes, the volume itself would disappear unless we make sure to re-issue the volume and delete the old one. On further investigation I saw that we could use the same mechanism that other geometry types use: check
need_update_rebuild
(which I believe is triggered bytag_update
calls) first, and then checkis_modified()
if the previous one fails (which can be triggered whenused_shaders
gets changed).My hunch is that Blender normally keeps around the same
ccl::Shader
object pointer and only updates the shader graph so this was a non-issue, but in Gaffer we re-create the shader on every update, re-create and swap to the new shader. The above change I haven't tried in Blender yet, I'll do this next so it doesn't break things for Blender.I've also snuck in this MR the
get_precision()
call for VDB loaders, as I found we need to check precision in an interactive render to determine if we need to re-issue a volume with a different precision.Checkout
From your project repository, check out a new branch and test the changes.