Skip to content

Conversation

sfriedmapixar
Copy link
Contributor

Description

This requires you to first declare a setting for the dynamic array input that
will be used to size and provide values for any unconnected elements of the
dynamically sized array.  After that, individual scalar->arrayelem connections
can be specified from any number of different upstream shading nodes.  This
facilitates gathering inputs from across your shading network, for example
several procedurally generated color signals and using them to drive inputs
to shading nodes that are best left dynamically sized, such as the inputs
to spline operations.

Tests

This includes a new test in vararray-scalar-connect to demonstrate and
test the new connection method.

Checklist:

  • [ X] I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format v17 before submitting, I definitely will look at
    the CI test that runs clang-format and fix anything that it highlights as
    being nonconforming.

…ay input.

This requires you to first declare a setting for the dynamic array input that
will be used to size and provide values for any unconnected elements of the
dynamically sized array.  After that, individual scalar->arrayelem connections
can be specified from any number of different upstream shading nodes.  This
facilitates gathering inputs from across your shading network, for example
several procedurally generated color signals and using them to drive inputs
to shading nodes that are best left dynamically sized, such as the inputs
to spline operations.

This includes a new test in vararray-scalar-connect to demonstrate and
test the new connection method.
:

Signed-off-by: Stephen Friedman <sfriedma@pixar.com>
… to init the values that upstream nodes will overwrite, so remove that to simplify.

Signed-off-by: Stephen Friedman <sfriedma@pixar.com>
@johnhaddon
Copy link
Contributor

This seems very useful. We currently achieve the same thing with shaders which take N scalar inputs and output arrays of length N, which isn't very elegant. Seems like the PR has been stale for a while - is there any chance of it being revived?

@lgritz
Copy link
Collaborator

lgritz commented Sep 1, 2025

I'm not sure how this slipped through the cracks; apologies about that. I'm in favor of this generally. @sfriedmapixar, can you please rebase on the current main, and then I promise I will quickly review and merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants