Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader input array not working #1710

Closed
cedricp opened this issue Dec 13, 2021 · 2 comments
Closed

Shader input array not working #1710

cedricp opened this issue Dec 13, 2021 · 2 comments

Comments

@cedricp
Copy link

cedricp commented Dec 13, 2021

Description of Issue

Error generated when a shader input is an array of bindings. Here's an sample with a PxrSwitch shader :

        def Shader "MASTER_SWITCH"
        {
            uniform token info:id = "PxrAttribute"
            color3f inputs:defaultColor = (0, 0, 0)
            float inputs:defaultFloat
            vector3f inputs:defaultFloat3 = (0, 0, 0)
            int inputs:defaultInt
            string inputs:type = "int"
            string inputs:varname = "dw_variation"
            int inputs:verbosity
            float outputs:resultF
        }
        def Shader "SPC_PxrSwitch"
        {
            uniform token info:id = "PxrSwitch"
            float inputs:index.connect = </Shading/Shaders/MASTER_SWITCH.outputs:resultF>
            color3f[] inputs:inputsRGB.connect = [
                </Shading/Shaders/SPC_Red.outputs:resultRGB>,
                </Shading/Shaders/SPC_Black.outputs:resultRGB>,
                </Shading/Shaders/SPC.outputs:resultRGB>,
            ]
            color3f outputs:resultRGB
       }

The returned error is :
Error in 'pxrInternal_v0_22__pxrReserved_::HdPrman_Xcpt::HandleXcpt' at line 44 in file /storage/sources/GIT/USD/third_party/renderman-24/plugin/hdPrman/xcpt.cpp : 'S20006 OSL: ConnectShaders: cannot connect a color (resultRGB) to a color[] (inputsRGB)_

Maybe I'm doing it wrong ?
Best regards

System Information (OS, Hardware)

Linux CentOS7 x86_64

Package Versions

dev branch

Build Flags

Standard

@jilliene
Copy link

Filed as internal issue #USD-7074

@FlorianZ
Copy link
Contributor

@cedricp you're not doing anything wrong. This is supposed to work the way you wrote it. We need to complete an internal project to make this work, but currently don't have an ETA. We'll keep you posted if this changes.

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

No branches or pull requests

3 participants