Amplifying your potential.

Too Many Texture Nodes?

Node-based Shader Editor
7 posts • Page 1 of 1

Too Many Texture Nodes?

Postby JBT27 » Sun Jun 17, 2018 9:22 pm

I have two sets of sampler nodes, each containing 7 sampler nodes and three lerps. I'm mixing various grass and rock maps to break up tiling on a 4km x 4km terrain mesh. However, I got this error:

Shader error in 'TopoConistonMaster': maximum ps_5_0 sampler register index (16) exceeded at line 73 (on d3d11)

If I disconnect a couple or so samplers, the error goes away. So I'm assuming I have exceeded some Unity limit.

Is there a limit to the number of samplers I can use in a tree? I thought I could build a tree like I can in an offline rendering 3D app, but perhaps not here.

Thanks.
JBT27
 
Posts: 9
Joined: Wed Jun 06, 2018 3:52 pm

Re: Too Many Texture Nodes?

Postby JBT27 » Wed Jun 20, 2018 1:55 pm

Is 16 sampler nodes the limit? I can't find anything on the wiki about this.

Thanks.
JBT27
 
Posts: 9
Joined: Wed Jun 06, 2018 3:52 pm

Re: Too Many Texture Nodes?

Postby Strkl » Thu Jun 21, 2018 1:05 am

The same issue appears in unreal when doing to much texture sampling on material. To fix this you need to switch the UV sampling mode of the Textures to "Shared : Wrap", if there is an option like this in ASE, it should work !
User avatar
Strkl
 
Posts: 2
Joined: Thu Jun 21, 2018 12:51 am

Re: Too Many Texture Nodes?

Postby JBT27 » Thu Jun 21, 2018 9:51 am

Thank you. I'll take a look and do some experimenting. Not sure why Amplify haven't responded to my question when they have answered later questions. Very frustrating. But thanks again - I'll see if that's a possibility. I hope so.
JBT27
 
Posts: 9
Joined: Wed Jun 06, 2018 3:52 pm

Re: Too Many Texture Nodes?

Postby Amplify_Borba » Mon Jun 25, 2018 4:36 pm

Hello, sorry for not getting back to you earlier, the ASE team was preparing for the Unite Berlin event at the time of your post and, as a result, we weren't able to provide the timely support that you'd expect from us.

Regarding the error you're getting, I can confirm that you are limited to a fixed amount of textures in DX11, and even though it states that you can use up to 16 samplers, the max number you can really use is lower than that and may vary according to your project. This is because a Unity Surface Shader may internally use some samplers for itself( e.g. if you are using light maps ).

There's only two ways around this limitation, you either reduce the amount of textures by packing some of them together or by creating a texture atlas. You can pack a bunch of them together as a texture array, which will let you use just one texture asset, the caveat being that all texture import settings between the textures that compose that array must be the same. For instance, if you are packing all 16 textures in there they all must be of the same size, or if one of them is a normal map in linear space they all must be normal maps in linear space.

We also offer a simple tool to allow you to create your own texture arrays. You can find it at Window>Amplify Shader Editor>Texture Array Creator.

Please let me know if this helps, and if you have any follow up questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 802
Joined: Mon Jul 24, 2017 9:50 am

Re: Too Many Texture Nodes?

Postby JBT27 » Wed Jun 27, 2018 9:20 pm

Thanks for your reply - yes, very useful response. The texture array sounds like the answer, so I'll take a look at that - thanks very much.
JBT27
 
Posts: 9
Joined: Wed Jun 06, 2018 3:52 pm

Re: Too Many Texture Nodes?

Postby Amplify_Borba » Thu Jun 28, 2018 9:58 am

No problem, glad I was able to help!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback.
Every bit helps, your feedback is extremely valuable to us!

Feel free to get back in touch if you have further issues or questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 802
Joined: Mon Jul 24, 2017 9:50 am


7 posts • Page 1 of 1

Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 2 guests