Comp issues of shaders under OpenGL, fine in DX

  • Martigen
  • Topic Author
More
5 years 8 months ago #1 by Martigen Comp issues of shaders under OpenGL, fine in DX was created by Martigen
@Crosire,

I'm assuming this is on the Reshade side: I use a central repository for shaders, so all games load shaders from the same directory. For DX games there's just a handful of shaders that issue warnings -- and I know some warnings are just that, and the shaders load and work fine anyway.

But in OpenGL many more shaders are are reporting issues, and quite a few of them don't load at all as a result (inclduing SMAA).

Log here if you can take a look:

pastebin.com/DWcC5LSt

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

  • lukonja
More
5 years 8 months ago #2 by lukonja Replied by lukonja on topic Comp issues of shaders under OpenGL, fine in DX
DirectX will compile and work properly cause there is full support for DirectX when they are using vertex, and OPEN_GL uses different method for vertex, by that meaning original if original author didn't put open_gl support it will compile and give you an error. You must ask original author to make support for open_gl or do it yourself, since front and back buffers for vertex and in general are different from eachother.
Also some of "issues" for OPEN GL are being solved as you posted this. You can always download and compile newest reshade from here:
github.com/crosire/reshade
there was a quickfix for open_gl, so might have luck with some shaders.
But for rest you must ask original authors to add support, or rewrite them yourself and post them to original author.

My english is bad, but I hope you understood, sometimes I confuse myself with my bad english...

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

  • crosire
More
5 years 8 months ago - 5 years 8 months ago #3 by crosire Replied by crosire on topic Comp issues of shaders under OpenGL, fine in DX
ReShade takes care of OpenGL compability. Shaders should work independently from the API, so that it's not the job of the shader authors care for this.

Anyway, the errors you are seeing aren't ReShade's fault per se. You just have too many shaders. ReShade shares texture/sampler/... bindings between all shaders and there is only a limited set of bindings available in OpenGL, so at some point they will be exhausted. You'll have to clean up your shared shader directory a little and remove everything you don't need.
Last edit: 5 years 8 months ago by crosire.

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

  • Martigen
  • Topic Author
More
5 years 8 months ago #4 by Martigen Replied by Martigen on topic Comp issues of shaders under OpenGL, fine in DX

crosire wrote: ReShade takes care of OpenGL compability. Shaders should work independently from the API, so that it's not the job of the shader authors care for this.

Anyway, the errors you are seeing aren't ReShade's fault per se. You just have too many shaders. ReShade shares texture/sampler/... bindings between all shaders and there is only a limited set of bindings available in OpenGL, so at some point they will be exhausted. You'll have to clean up your shared shader directory a little and remove everything you don't need.

Bugger :) I guess I'll make a separate smaller repository for OGL games. I like having all shaders available so with each new game the full complement is there to tweak and play with.

Do files being loaded from the Textures directory count towards the binding limit?

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

  • crosire
More
5 years 8 months ago #5 by crosire Replied by crosire on topic Comp issues of shaders under OpenGL, fine in DX
It doesn't matter if an image file exists or not, if a shader defines a texture, then that's a binding. So the texture directory itself has no effect on this.

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

  • Martigen
  • Topic Author
More
5 years 8 months ago #6 by Martigen Replied by Martigen on topic Comp issues of shaders under OpenGL, fine in DX

crosire wrote: It doesn't matter if an image file exists or not, if a shader defines a texture, then that's a binding. So the texture directory itself has no effect on this.

Thanks for explaining. I presume this means it's not so much the number of shaders being loaded, but also what they do, as different shaders can bind multiple samplers/textures etc so some shaders will be using more resources than others.

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

  • crosire
More
5 years 8 months ago #7 by crosire Replied by crosire on topic Comp issues of shaders under OpenGL, fine in DX
Correct.

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

  • Martigen
  • Topic Author
More
5 years 8 months ago #8 by Martigen Replied by Martigen on topic Comp issues of shaders under OpenGL, fine in DX
Every shader loads fine now, except for one. I think is an issue with the shader from Ioxa.
17:02:40:963 [03052] | INFO  | Compiling 'm:\reshade_ogl\shaders\Clarity2.fx' ...
17:02:40:974 [03052] | ERROR | Failed to compile 'm:\reshade_ogl\shaders\Clarity2.fx':
0(43) : error C7011: implicit cast from "float" to "bool"
0(43) : error C7011: implicit cast from "float" to "bool"
0(110) : error C7011: implicit cast from "int" to "bool"
0(110) : error C7011: implicit cast from "int" to "bool"
 m:\reshade_ogl\shaders\Clarity2.fx(244, 8): error: internal shader compilation failed
Fragment info
-------------
0(43) : error C7011: implicit cast from "float" to "bool"
0(43) : error C7011: implicit cast from "float" to "bool"
0(110) : error C7011: implicit cast from "int" to "bool"
0(110) : error C7011: implicit cast from "int" to "bool"
(0) : error C2003: incompatible options for link
 m:\reshade_ogl\shaders\Clarity2.fx(729, 1): error: program linking failed
Note the shader loads fine in DX-based games. Is this something that might just be a quick fix?

@Ioxa are you still around? :)

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.