I wrote a dynamic material layering shader to support the new update from Substance, and while it works for GLCore/DX10+, it doesn’t work on DX9 despite only having 14 samplers.
I’ve read that Unity uses one of them for lightmaps but what are the other two? If I bring it down to 13 samplers it works.
This is with just a surface shader, so Unity is obviously compiling some of its own samplers into the code. It’s set to fullforwardshadows.
well, in unity 5.4. you will loose even another 3 samplers.
forward is the most demanding path. internal texture that are used e.g.:
- shadow map
- light cookie
- gi lightmaps
…
use the frame debugger to see which textures are used by each shader.
1 Like
I’m currently using Deferred actually, on 5.4, removing the fullforwardshadows part has no effect on the limit for me though, unfortunately. Even setting “nolightmap”.
I guess I’m out of luck there then…
if you are on 5.4 you will have to skip new volumetric ambient lighting.
unfortunately there is no pragma for this. so you have to use #pragma noambient
and add sh ambient lighting manually. that frees 3 texture samplers.