Giter Club home page Giter Club logo

Comments (2)

bernardkwok avatar bernardkwok commented on May 27, 2024

Unfortunately at this time custom output types like the struct you have is not supported by code generation.

For the case shown here, the "myoutput" struct will need to be split into two separate outputs on your "myfunc" definition. These can then be connected to (as opposed to members of the output).

For the implementation, I think the following should work:

void myfunc(vec3 in1, vec3 in2, out vec3 color, out float roughness)
{
    color = in1 + in2;
    roughness = 0.5;
}
```
If not then a nodegraph based implementation may be required.

from materialx.

jstone-lucasfilm avatar jstone-lucasfilm commented on May 27, 2024

Thanks for this report, @numega, and @bernardkwok is correct that member elements have never been supported in the MaterialX code generators.

Our current sense is that multi-output nodes are a better solution to the problem that member elements were originally proposed to solve, and we're leaning towards removing member elements from the 1.39 specification.

If you'd like to join the conversation around the 1.39 specification, we'd definitely appreciate your input on the MaterialX channel of the ASWF Slack:

https://www.materialx.org/DiscForum.html

For now, I'll close this original report, and we can continue the discussion on the ASWF Slack as needed.

from materialx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.