question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NodeMaterial: Using usampler2D with node materials

See original GitHub issue

It seems like there’s no way to use usampler2D uniforms in node materials (note the u). With standard materials, one can just create a THREE.DataTexture and pass it as a uniform (e.g. THREE.RedIntegerFormat, THREE.UnsignedByteType, and .internalFormat = "R8UI"). It’s not clear how to do something like this with nodes. My initial guess was that creating a Nodes.TextureNode with a given DataTexture will work, but it generates glsl code for a uniform like this:

uniform sampler2D nodeU1;

It seems like it can only create sampler2D’s.

Maybe there needs to be a Nodes.DataNode or something like that?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
LeviPesincommented, Feb 26, 2022

The old node system, which was located in examples/jsm/nodes was replaced in r138 by the new node system, which was located in examples/jsm/renderers/nodes (and now it is located in examples/jsm/nodes).

1reaction
sunagcommented, Feb 25, 2022

Yes, but we don’t have this features in new system. I think it’s better to leave it open for now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node Material - Babylon.js Documentation
The Node Material is a simple, highly customizable material that you can build yourself piece by piece. Combined with the powerful node-based editor, ......
Read more >
Procedural Node Material Shaders: 3 Tips For Getting Started
The Node Material Editor has empowered me to drive faster and further than I ever thought possible in the area of using math...
Read more >
Using the Main Material Node - Unreal Engine Documentation
Inside Unreal Engine 4 (UE4) the Material Expression nodes that are used to create Materials contain small snippets of this HLSL code. To...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found