Code Monkey home page Code Monkey logo

Comments (7)

LeviPesin avatar LeviPesin commented on May 18, 2024 2

I'm preparing a PR that I think will solve this issue as part of its changes. (It's quite a large PR so maybe will take a week or two to finish it)

from three.js.

LeviPesin avatar LeviPesin commented on May 18, 2024 2

I now think you can solve the issue just by changing attribute( 'color' ) in the line

colorNode = vec4( colorNode.xyz.mul( attribute( 'color' ) ), colorNode.a );
to attribute( 'color', 'vec3' ). If this works, feel free to file a PR with this change.

from three.js.

andreasrosdal avatar andreasrosdal commented on May 18, 2024 2

Yes, this change worked correctly! Thank you. I can make a PR with this change now.

from three.js.

andreasrosdal avatar andreasrosdal commented on May 18, 2024

The error message is about the variable DiffuseColor, and that there is some exception assigning this variable.

DiffuseColor is for example mentioned here in the Three.js source code:
https://github.com/mrdoob/three.js/blob/master/examples/jsm/nodes/core/PropertyNode.js#L40

from three.js.

andreasrosdal avatar andreasrosdal commented on May 18, 2024

@LeviPesin Excellent. Do you understand what causes the error in this case? Is there some work-around quick-fix I can try? Thank you!

from three.js.

LeviPesin avatar LeviPesin commented on May 18, 2024

Possibly your geometry has a color attribute (i.e. storing vertex colors), which is of type vec4, not vec3 (it should be auto-converted to vec3, but if not, that's a bug)? So as a workaround I would suggest changing it to vec3.

from three.js.

andreasrosdal avatar andreasrosdal commented on May 18, 2024

How can I modify the code to get a more accurate error message? How can I get a stacktrace from this? Can I find out which geometry is causing this? There are many models loaded from glTF, so possibly some of these models have color attributes?

from three.js.

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.