Error after loading 50+ shaders

  • Posts: 2
2 years 3 weeks ago #1 by HekutoruMAC
Henlo. After loading more than fifty shaders with ReShade 3.1.2 these errors appear for each additional one, even with all of them deactivated:
shader.fx(xxx, x): error: internal shader compilation failed

Vertex shader failed to compile with the following errors:
ERROR: 0:xx: error(#385) Binding point for: uniform sampler must be equal or greater than 0 and less than: GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
ERROR: error(#273) x compilation errors.  No code generated

[...]

Vertex and Fragment shader(s) were not successfully compiled before glLinkProgram() was called.  Link failed. 
Vertex shader failed to compile with the following errors:
ERROR: 0:xx: error(#385) Binding point for: uniform sampler must be equal or greater than 0 and less than: GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
ERROR: error(#273) x compilation errors.  No code generated
Below fifty, no problems arise. Already tried different combinations to no avail. Any ideas about what could be happening?
Thanks, Hekutoru

Please Log in or Create an account to join the conversation.

  • Posts: 3665
2 years 3 weeks ago #2 by crosire
Yes. ReShade shares texture samplers between effects. DirectX/OpenGL have a limit to how many samplers can be bound at the same time, which using an excessive amount of shaders will quickly reach because of that. Only solution is to use less shaders.
The following user(s) said Thank You: HekutoruMAC

Please Log in or Create an account to join the conversation.

  • Posts: 266
2 years 3 weeks ago #3 by robgrab
Seems ridiculous to have that many shaders running. Why not just tweak the color, contrast, levels, etc. the way you like it and create a LUT? I rarely use more than 5 shaders any more since learning how create LUTs.
The following user(s) said Thank You: HekutoruMAC

Please Log in or Create an account to join the conversation.

  • Posts: 2
2 years 3 weeks ago #4 by HekutoruMAC

Seems ridiculous to have that many shaders running.

I downloaded all the shaders, that's what i meant by loading so many, but I'm activating only some of them.
Guess it'll be better to have local sets of shaders per game instead of a general collection like I used to.
Thanks for the advice!

Please Log in or Create an account to join the conversation.

  • Posts: 266
2 years 3 weeks ago #5 by robgrab
Yeah, I never download all the shaders. A lot of them are redundant and similar results can be achieved using different shaders. Others are for doing specialized things, like faking a CRT screen effect, which I would never need. There are less than 10 "essential" shaders that I ever use but I can usually pare that down to 5 by the time I get the look I want.
The following user(s) said Thank You: HekutoruMAC

Please Log in or Create an account to join the conversation.