Some shaders fail to compile in GitHub version

  • Daodan
  • Topic Author
More
5 years 5 months ago - 5 years 5 months ago #1 by Daodan Some shaders fail to compile in GitHub version was created by Daodan
In order to get the latest bugfixes I built ReShade from the GitHub repo but in some d3d11 games some shaders fail to compile. To be specific: shaders fail that declare a texture and don't use a literal expression for the width and height values.
Example (Dark Souls III):
F:\GitHub\reshade-shaders-crosire\Shaders\CinematicDOF.fx(281, 27): error X3011: value must be a literal expression
Lines 280 & 281 from CinematicDOF:
texture texCDCoCTmp2 { Width = BUFFER_WIDTH; Height = BUFFER_HEIGHT; Format = R16F; };.
texture texCDCoCTileTmp { Width = BUFFER_WIDTH/((TILE_SIZE*2)+1); Height = BUFFER_HEIGHT/((TILE_SIZE*2)+1); Format = R16F; };

Any ideas whether I can do anything on my end to fix this?
The latest release works fine btw, so it's currently not a big issue.
Last edit: 5 years 5 months ago by Daodan.

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

  • crosire
More
5 years 5 months ago #2 by crosire Replied by crosire on topic Some shaders fail to compile in GitHub version
It compiles fine on both branches for me ("master" and "codegen" which contains a new experimental compiler partly written from scratch, with lots of improvements) :huh:. Try to sync to top-of-tree again and do a clean rebuild. Because that shader uses a literal expression (yes, there is math involved, but on constants, so it can be evaluated at compile-time), otherwise the error would be correct.

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

  • Daodan
  • Topic Author
More
5 years 5 months ago #3 by Daodan Replied by Daodan on topic Some shaders fail to compile in GitHub version
I cloned the repo again yesterday and built ReShade and now the issue arises only in DS3. Before that any d3d11 game was affected.

Just to make sure I didn't screw anything up, here's what I did:
  1. Cloning rehshade:
    $ git clone --recurse-submodules https://github.com/crosire/reshade.git
  2. Build: Release 32-bit and 64-bit
  3. Build: Release Setup 64-bit

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.