Coder Social home page Coder Social logo

Comments (6)

kwokcb avatar kwokcb commented on August 15, 2024

Shouldn't we be tagging the inputs accordingly based on the spec otherwise this is very "brittle" ?

from materialx.

JGamache-autodesk avatar JGamache-autodesk commented on August 15, 2024

Definitely. I was not aware of the hint metadata until you pointed it to me. This is going to solve many issues.

from materialx.

JGamache-autodesk avatar JGamache-autodesk commented on August 15, 2024

I don't see any new code in isTransparentShaderNode() that uses those hints though. And none of the surfaces in bxdf use the new spec. I guess the feature did not make it in 1.39.1.

from materialx.

kwokcb avatar kwokcb commented on August 15, 2024

I guess not.

I'd suggest the following interface changes:

  1. Add a Input.hasTransparencyHint() and / or Input.hasOpaqueHint() and setters for completeness.
  2. Add a Node.getOpaqueHintList() on the node which can scan using methods in 1. to build a "opaque comparison" dictionary.
  3. Call getOpaqueHintList() when testing

from materialx.

JGamache-autodesk avatar JGamache-autodesk commented on August 15, 2024

Looks very good. Adding a bit of caching at the NodeDef level would help to make sure we do not rescan the list of inputs every time looking for the ones with hints.

from materialx.

kwokcb avatar kwokcb commented on August 15, 2024

I did not add in caching to keep this the logic for generic "hint" accessors and the transparency checking logic localized in the util.

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.