You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update SceneObject to allow binding to a named output #298
scene_rdl2: lib/scene/rdl2/SceneObject.{h,cc} need to allow binding of an attribute to a particular output on a shader object.
Some Implementation Thoughts
add setBinding version which takes an output name
getBinding needs to also return the output key or name
Should there still be a way to get the binding without accepting a name for backward compatibility?
If so, what should happen if an old getBinding is called on a binding which isn't the only output and isn't the default output (if there is a default)?
add an an array of output name or key to match mBindings array (one entry per attributes index)
We need to review how we want to handle existing code which just gets the binding as a return ShaderObject. Some options are:
Force the code to update immediately to reading the bound output in addition to the bound object
Keep a getBinding function which doesn't ask for the bound output and the code will just act like it's an old school binding.
Keep a getBinding function which doesn't ask for the bound output and emit an error message and act as if there is no binding if it is an multi-output shader.
Keep a getBinding function which doesn't ask for the bound output but throw an exception if the this is used with a multi-output shader.
options 2,3, and 4 could be done as temporary measures until there is time for all code to update. This will allow things to be done in phases and won't matter as long as there aren't any multi-output shaders.
We've decided to do #2, have calls to legacy getBinding() functions ignore the output part of the binding. This will allow work to move forward all of the task for multi-output shaders and won't matter until there are actually multi-output shaders in use. I've added openmoonray #320 to remove the functions at the end of this process.
Activity
pramsey1234 commentedon Sep 23, 2026
scene_rdl2: tests/lib/scene/rdl2/TestSceneObject should be updated to test the new functions
pramsey1234 commentedon Oct 5, 2026
openmoonray #297 is still in review so I'm working on this as a branch off of that work.
pramsey1234 commentedon Oct 5, 2026
We need to review how we want to handle existing code which just gets the binding as a return ShaderObject. Some options are:
options 2,3, and 4 could be done as temporary measures until there is time for all code to update. This will allow things to be done in phases and won't matter as long as there aren't any multi-output shaders.
pramsey1234 commentedon Oct 6, 2026
We've decided to do #2, have calls to legacy getBinding() functions ignore the output part of the binding. This will allow work to move forward all of the task for multi-output shaders and won't matter until there are actually multi-output shaders in use. I've added openmoonray #320 to remove the functions at the end of this process.