Author Topic: [osx] ERROR: Implementation limit of 16 active fragment shader samplers [...]  (Read 4929 times)

Hi there,
when I open the "Hydrant sample" I run into this error:

[Scene 3D] 3D scene successfully loaded
[GenericMaterial] Program link log:
[GenericMaterial] ------------------
[GenericMaterial] ERROR: Implementation limit of 16 active fragment shader samplers (e.g., maximum number of supported image units) exceeded, fragment shader uses 29 samplers
[GenericMaterial] Creation of the shader preview-material-shader successful


Without changing anything, the shaders applied on the hydrant appear pink and there's nothing I can do with this new feature.

Substance Painter, version 2.2.0
Build 1275 - 84b18767c9af34243e1f6576f5fc0680ebd2e05a
OS X 10.9.5, iMac 27", 3.5 GHz Intel Core i7, NVIDIA GeForce GTX 780M 4096 MB, 8 GB 1600 MHz DDR3

Any solutions for this?

Material layering is not available on Mac due to Apple's poor OpenGL drivers.
There is nothing we can do unfortunately to improve the situation unless Apple updates their OpenGL support.

It is not recommended to sell a software with new tools not supported by certain operating systems, especially if there are known bugs.
I hope that this thing will be resolved soon for all customers who have paid for a tool unusable without being warned about it!
I am very saddened by this matter...

Hi,

This is mentioned in the release note:
https://www.allegorithmic.com/products/substance-painter/release-notes

"Known Issue :
[Mac] Texture samples limit is locked at 16 (GPU driver issue)"

Please note that this is not a bug. This is a limitation from Mac OS X. You can use material layering as long as you don't go over 16 samplers.

Cheers,
Head of Product Management

Hi, thanks for the answer.
Could you please tell me where and how to handle the samplers and drop them from 29 to 16?

You would need to edit the shader.
You can export the shader and modify it by choosing the "material-layering-shader" in the shelf, and right-click export.
Head of Product Management

The Mac OS X limitation is understood, but the sample shaders provided should be compatible with the limitation. Seeing as you have a separate download for OS X, there should be a different set up bundled shaders for OS X that only use 16 samples.

If that's not feasible, at least package it with a sample hydrant that works.

-Chris

The point is that the 16 limit samplers for Mac OSX is simply too low to use the material layering workflow.
This would mean blending 2 materials together on the whole object, and it thus wouldn't demonstrate anything. When material layering is used in a game, there is an average of 10 materials per mesh (sometimes even way more).

To sum up: you "can" use this workflow as long as you don't go over 16 samplers, but this isn't realistic to be used in a real production, which would require lots of materials.

As a reminder, the material layering workflow is "just" a way for the artist to visualize what he would see in his game engine with the same technic. As this technic is a global limitation on Mac, you would probably not be able to use it efficiently in any game on Mac as the game engine wouldn't support it.
Last Edit: August 11, 2016, 04:42:41 am
Head of Product Management

I understand the limitations due to the old version of OpenGL the Mac OS has. I doubt Apple will improve this as their focus seems to be on the Metal API. Will you be supporting Metal in Substance Painter so we can take advantage of these newer features?

It's too soon to answer any questions about Metal unfortunately.
Metal is still really young and many of our dependencies don't support it yet. That's doesn't mean we won't look into it. :)
Don't forget your log file. It can be exported from the Help menu of the software.
-----------
Froyok aka Fabrice Piquet, Technical Artist and Product Designer at Allegorithmic.

Oh well, no material layering for me then.

Ugh.  I wish you guys had mentioned this on the youtube videos . I spent a good hour watching them, and a good amount of more time trying to figure out why it wasn't working.  Perhaps a more specific "Error" message would make sense.


Hang on a second, Apple has supported OpenGL 4.x for years, and I've had no such issues with shader limitations in other applications.  Metal is newer, but still has been available for well over a year.  For a set of software tools that bill themselves as being advanced and professional, blaming the operating system for failings in your own years-old implementations seems weak.

The issue doesn't come from the theoretical OpenGL version supported by OsX but by the openGL drivers available which do not support the technique we use to bypass the 16 samplers limit (bindless textures). You will likely encounter that same 16 samplers limit in other real time apps and engines (Unity, UE4).

So you are not supporting OSX anymore? The software I am paying you for is not usable on OSX without me fiddling with it? You shipped software for a platform knowing that it would not work? Sorry just want to confirm the facts before I cancel my subscription.