4.5

More
9 months 1 week ago - 7 months 2 weeks ago #1 by crosire
4.5 was created by crosire
The next update is around, with big improvements to the Vulkan backend, effect compiler and the GUI. Not to mention better performance in DX12/Vulkan, improved depth buffer detection in DX9 and DX12, display of preprocessor definitions as variable widgets and new options for shader developers to customize how settings should be displayed in the GUI:



Changelog

4.5.0:
  • Rework depth buffer detection code for all APIs again (They are now more similar, including more options for OpenGL)
  • Switched to using SPIR-V for shaders in OpenGL 4.6 for better performance (this needs recent drivers to work correctly)
  • Added UI widgets for preprocessor definitions to variable list
  • Added compiler error when passing a r-value to an out parameter of a function
  • Added compiler error when pass is missing shader functions
  • Added shader signature verification to effect compiler
  • Added support for assignment chains to ReShade FX (e.g. "a = b = c = 0;")
  • Added adjustment buttons to combo box widget and label to radio button list
  • Added option to show only specific color components in texture preview
  • Added context menu to technique list to edit included files in addition to the main source file
  • Added support for texture pooling via "pooled" annotation
    texture MyTex1 < pooled = true; > { Width = 100; Height = 100; Format = RGBA8; };
    texture MyTex2 < pooled = true; > { Width = 100; Height = 100; Format = RGBA8; };
    ReShade will now attempt to re-use the same memory for textures with the same dimensions and format if the pooled annotation is set. This works across effect files too.
  • Added "ui_text" annotation for uniform variables to display custom text above the variable widget (see screenshot above)
    uniform float test < ui_text = "This is text that will be rendered above the widget in the variable list"; >;
  • Added support for GPU timings in Vulkan
  • Added environment variable to override path ReShade should load the next DLL from
    You can now set "RESHADE_MODULE_PATH_OVERRIDE" to a directory for ReShade to load the next DLL, so you can chain ReShade with other injectors
  • Added OpenGL version information to log
  • Improved compiler error recovery for parsing errors in function parameter list and annotations
  • Improved Vulkan command buffer management (which improves performance)
  • Improved multi-threading of effect loading
  • Changed setup tool to install global Vulkan layer while it is open (fixes issues with RDR2)
  • Changed setup tool to use .NET framework 4.5 again for backwards compatibility
  • Changed texture preview to be hidden when effects are disabled
  • Changed COM reference counting behavior to better match COM requirements
  • Change default preset path to executable directory for Vulkan compatibility
  • Fixed memory leak in Vulkan (which worsened every frame)
  • Fixed depth buffer detection in Vulkan
  • Fixed setup tool not updating search paths to absolute paths in Vulkan
  • Fixed HLSL compiler error for variables that are named "Technique" or "Pass"
  • Fixed effect compile error with "discard" statement as last statement in a function with a return value
  • Fixed effect compiler error in pass definition not causing effect compile to fail
  • Fixed effect compiler error when multiple casts are chained in an expression
  • Fixed annotation assignments not supporting literal expressions (you can now write stuff like "< ui_min = 1 + 2; >")
  • Fixed effect compiler sometimes reporting duplicated syntax errors
  • Fixed crash in effect compiler when encountering an undeclared identifier in a shader pass state
  • Fixed empty preprocessor macros not being evaluated correctly
  • Fixed GLSL code generation for matrix indexing
  • Fixed GLSL code generation for vertex shaders with a return semantic
  • Fixed GLSL code generation for some component-wise operations
  • Fixed GLSL code generation for entry points with underscores in the name
  • Fixed GLSL code generation for boolean values in index expressions
  • Fixed GLSL code generation for arithmetic with matrices that are not floating point
  • Fixed D3D10/11 depth stencil view creation failing in some games (e.g. ArmA 3)
  • Fixed OpenGL depth texture creation failing for games using format "GL_DEPTH_COMPONENT" (e.g. Mugen 1.1)
  • Fixed OpenGL states not being restored during texture upload, which caused texture artifacts in some games
  • Fixed crash if "wglMakeCurrent" was called on an OpenGL context that was not hooked
  • Fixed access to textures in vertex shaders in D3D9 (limited to 4 bindings though)
  • Fixed "UseAspectRatioHeuristics" option not being stored in config file in D3D9
  • Fixed wrong color write mask when there is more than one render target in D3D9
  • Fixed Vulkan performance mode using wrong values
  • Fixed current depth stencil inheritance in D3D12 buffer detection
  • Fixed shared textures being deleted prematurely if a single effect is unloaded
  • Fixed preset switching always falling back to DLL directory for next preset
  • Fixed position of slider buttons
  • Fixed slider buttons being able to change value outside valid range due to floating-point precision errors
  • Fixed splash bar no longer appearing on reload after reloading a single effect
  • Fixed scaling up the font size causing cropping some buttons and the display of textures on the statistics page
  • Removed format filtering from depth buffer detection
  • Removed tutorial skip button for all but the first tutorial step

4.5.1:
  • Added "Ctrl + F" search support to code editor
  • Added "bufready_depth" source for bool uniform variables to check if depth buffer is available
  • Added error when going over the active effect limit of 50 in Vulkan
  • Added "Reset to default" context menu entry for preprocessor definitions
  • Added support for uniform matrix variables to UI and presets
  • Added list of effect files that failed to compile to "Home" page
  • Added automatic reset of preprocessor definitions if shader fails to compile after changing one
  • Added UAC shield and button to cover global Vulkan layer check box in setup tool when not running with elevated privileges
  • Changed "Reset all to default" button to also reset preprocessor defines
  • Changed Vulkan layer installation location to HKLM instead of HKCU if the global option is selected
  • Improved SPIR-V code generation for performance mode in Vulkan
  • Fixed D3D9 render state block setup using invalid states (fixes artifacts in Sims 4)
  • Fixed missing buffers in OpenGL depth buffer detection
  • Fixed OpenGL depth buffer override
  • Fixed cropped OpenGL depth buffers (in emulators, like CEMU)
  • Fixed missing buffers in D3D9 depth buffer detection when "Copy before clear operations" is active (e.g. Mass Effect 2)
  • Fixed keys getting stuck in down state (e.g. when Alt + Tabing):
    ReShade will now automatically reset the key state when it has not been updated for more than 5 seconds
  • Fixed UI corruption with lots of text on the screen
  • Fixed cursor position if render window was not visible during creation
  • Fixed floating-point display precision for sliders
  • Fixed constant folding for matrix index expressions
  • Fixed setup crash if Vulkan layer installation was not successful
  • Removed debug logging code from D3D9 that was left in by accident

4.5.2
  • Added "Ctrl + H" replace support to code editor
  • Added option to save screenshot with user interface visible
  • Fixed hooking in Alan Wake
  • Fixed inverted shaders and artifacts in OpenGL games (happens because of a driver bug, so had to disable use of SPIR-V there again)
  • Fixed missing OpenGL depth buffer copy in Dolphin
  • Fixed current OpenGL context getting lost when a different one is deleted but not current (WineD3D now works with ReShade)
  • Fixed OpenGL depth buffer detection for when pixel format does not contain depth
  • Fixed multiple ReShade instances in the same process interfering with each other by forcing a single instance
    ReShade will now exit immediately if another instance was found in the same process already.
  • Fixed crash when pressing "Shift + Tab" in code editor with an empty line selected
  • Fixed crash when searching backwards in code editor with the cursor at the end of a line
  • Fixed uniform offset calculation for matrices in SPIR-V code generation

4.5.3
  • Redesigned setup tool and added support for multiple shader repositories to download from
  • Added better error description for type conversion errors
  • Fixed "Print Screen" button status being reset every frame
  • Fixed Vulkan swapchain image view creation for sRGB/non-sRGB formats
  • Fixed Vulkan API version not being upgraded to required 1.1 in applications that use 1.0
  • Fixed namespace resolving for function calls and structure names
  • Fixed GLSL code generation for constant arrays
  • Fixed line number for errors in generated GLSL code
  • Fixed missing array size in generated HLSL/GLSL code for uniform variables
  • Fixed hangs during shader compilation with specific applications on some drivers because of driver optimizations
  • Fixed negative percentage values during effect downloading in setup tool
  • Fixed error message not showing up when screenshot creation failed
  • Fixed "toggle" annotation on techniques not having any effect anymore
  • Fixed user being able to disable techniques that are set to always be enabled via "enabled" annotation
  • Improved code generation for variable initializers for better compile times
  • Improved readability of generated code for simple vector swizzles
  • Removed cursor from UI screenshots
  • Removed unused "SPV_GOOGLE_hlsl_functionality1" extension from generated SPIR-V code

4.5.4
  • Added error message when saving the current preset failed
  • Added warning message when access to depth buffers is disabled because of network activity
  • Added option to move FPS counter to a different corner of the screen
  • Added error log messages for Vulkan pipeline creation and memory allocation failures
  • Added compiler error when encountering sRGB read/write on a texture which does not use RGBA8 format
  • Added device and driver information to UI in Vulkan
  • Improved performance by avoiding unnecessary stencil clear operations
  • Reduced memory footprint for stencil operations in OpenGL
  • Changed setup tool to automatically copy a ReShade.ini dropped next to the tool into the game directory during installation
  • Changed caption of main button in setup tool to make user interaction more obvious
  • Replaced setup tool configuration file with a common "ReShade Setup.ini"
  • Fixed Vulkan support on AMD GPUs
  • Fixed crash in DOOM when using Vulkan
  • Fixed crash on exit when Vulkan application fails to properly clean up resources
  • Fixed Vulkan queue submission synchronization
  • Fixed small memory leak in Vulkan
  • Fixed flipped channels in HDR Vulkan screenshots
  • Fixed ReShade attempting to hook Vulkan devices that are created without the swapchain extension
  • Fixed Vulkan dispatch table initialization for command buffers in release mode
  • Fixed setup tool crash when all effects are unchecked
  • Fixed "SV_VertexID" values in D3D9 when "VertexCount" pass state is greater than 3
  • Fixed D3D10/11 depth buffer detection in Guild Wars 2
  • Fixed render targets in D3D10/11 having undefined contents on first use
  • Fixed rendering to more than two render targets in D3D12
  • Fixed input in games that handle input in a child window to the main render window (e.g. Supreme Commander)
  • Fixed code editor undo history getting lost after saving and reloading a file
  • Fixed opening the same file in code editor after closing it causing nothing to happen
  • Fixed global preprocessor definition popup showing cut off sometimes
  • Fixed SPIR-V code generation for function calls with sampler arguments
  • Fixed SPIR-V code generation for "tex2Dsize" intrinsic overload without mipmap level parameter
  • Fixed SPIR-V code generation for array uniforms
  • Fixed effect parser hanging when encountering an error inside a namespace
  • Fixed effect preprocesor hanging when encountering a single-character recursive macro
Last edit: 7 months 2 weeks ago by crosire.
The following user(s) said Thank You: Wicked Sick, CeeJay.dk, klotim, brussell, HSneak, Evan20xx, conan2k, Martigen, derrame, acknowledge and 45 other people also said thanks.
The topic has been locked.
More
9 months 1 week ago #2 by Carl_P
Replied by Carl_P on topic 4.5
Oustanding work, really appreciated. Thanks! :)
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #3 by Zacam
Replied by Zacam on topic 4.5
Just updated, everything seems to still be working just fine, no actual issues that I've run into (thank you for the AspectRatioHeuristics fix!)

But on the DX9 tab, is "SourceEngineFix" and "BruteForceFix" no longer needed? They're still preserved in my current ReShade.ini (I didn't make a new one) but wanted to double check.

I also went through the D3D9.log post run and noted the following (clean repository checkout on shaders, but a diff between them don't show these ones as having been updated):
\reshade-shaders\Shaders\Glitch.fx(132, 1): warning X4576: 'fragCoord': pixel shader signature does not match vertex shader one
...
\reshade-shaders\Shaders\Denoise.fx(232, 1): warning X4576: 'texcoord': pixel shader signature does not match vertex shader one
Glitch.fx fixed locally with
float4 PS_Glitch ( float4 pos : SV_Position, float2 fragCoord : TEXCOORD0) : SV_Target
... replaced with ...
float4 PS_Glitch ( float4 pos : SV_Position, float2 fragCoord : TEXCOORD) : SV_Target
Denoise.fx fixed with:
float3 PS_Denoise_NLM(float4 vpos : SV_POSITION, float2 texcoord : TEXCOORD0) : SV_TARGET {
... replaced with ...
float3 PS_Denoise_NLM(float4 vpos : SV_POSITION, float2 texcoord : TEXCOORD) : SV_TARGET {

As well as a slew of: (timed to frametime?):
07:10:48:903 [10040] | INFO  | ------
07:10:48:911 [10040] | INFO  | ------
07:10:48:920 [10040] | INFO  | ------
07:10:48:928 [10040] | INFO  | ------
07:10:48:936 [10040] | INFO  | ------
07:10:48:945 [10040] | INFO  | ------
07:10:48:954 [10040] | INFO  | ------
07:10:48:962 [10040] | INFO  | ------
07:10:48:971 [10040] | INFO  | ------
07:10:48:979 [10040] | INFO  | ------
07:10:48:987 [10040] | INFO  | ------
07:10:48:996 [10040] | INFO  | ------
07:10:49:004 [10040] | INFO  | ------
Which seems a bit ... verbose?
Last edit: 9 months 1 week ago by Zacam. Reason: Update Shader fixes information
The following user(s) said Thank You: crosire, DreamerN44
The topic has been locked.
More
9 months 1 week ago #4 by klotim
Replied by klotim on topic 4.5
Thank you, how can I set mipmap level for all shaders? Is it possible with preproccessor settings?
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #5 by crosire
Replied by crosire on topic 4.5

Zacam wrote: But on the DX9 tab, is "SourceEngineFix" and "BruteForceFix" no longer needed? They're still preserved in my current ReShade.ini (I didn't make a new one) but wanted to double check.

Those are no longer necessary.

Zacam wrote: As well as a slew of: (timed to frametime?):
Which seems a bit ... verbose?

Whoopsie. Yeah, that's debugging code that should not have made into the release. Luckily it only happens as long as you have the "D3D9" tab opened and visible in the GUI.

klotim wrote: Thank you, how can I set mipmap level for all shaders? Is it possible with preproccessor settings?

No, and it wouldn't make sense to do so. The screenshot just shows an example shader, the names shown there have no relevancy.
Last edit: 9 months 1 week ago by crosire.
The following user(s) said Thank You: Zacam
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #6 by klotim
Replied by klotim on topic 4.5
Alright.

The depth buffer is empty sometimes now with the latest version. On mass effect 2. It happens randomly at specific angles that I look at. Its d3d9 with aspect ratio setting on and copy depth buffer before clear. Same settings as before 4.5.

EDIT: Reverting to 4.4.2 fixed it immediately.
Last edit: 9 months 1 week ago by klotim.
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #7 by pyewacket
Replied by pyewacket on topic 4.5
Thank you for the release. I have a question about Vulkan. If i install it via setup.exe the only thing that appears in game's folder is Reshade.ini. Then i can either leave setup.exe running, or toggle the checkbox to enable it in every Vulkan game and close the steup.exe. So no matter which option i choose Reshade isn't injected in any game i tried (Q2RTX, Doom), there's no log and where i would even look for a log?
Last edit: 9 months 1 week ago by pyewacket.
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #8 by Vreem
Replied by Vreem on topic 4.5
Okay, got something weird here (I think). Just like Pyewacket the Vulkan API seems to do nothing. There is only Reshade.ini in the games directories and in C:\Users\*user*\AppData\Local\ReShade\ 4 files. Also the Uninstall is not working with Vulkan: when running ReShade.exe again, selecting the game and selecting Vulkan, it acts like a new install.
And here comes the weird thing: there is no log there after trying to run a game with Vulkan. But when I leave my browser (Vivaldi) open and run the game, ReShade64.log is created right away with these line:
19:47:45:291 [01240] | INFO  | Initializing crosire's ReShade version '4.5.0.739' (64-bit) built on '2019-12-13 21:33:14' loaded from "C:\Users\*user*\AppData\Local\ReShade\ReShade64.dll" to "C:\Users\*user*\AppData\Local\Vivaldi\Application\vivaldi.exe" ...
19:47:45:354 [01240] | INFO  | Registering hooks for "user32.dll" ...
19:47:45:354 [01240] | INFO  | > Libraries loaded.
19:47:45:354 [01240] | INFO  | > Found 13 match(es). Installing ...
19:47:45:354 [01240] | INFO  | Registering hooks for "ws2_32.dll" ...
19:47:45:354 [01240] | INFO  | > Libraries loaded.
19:47:45:354 [01240] | INFO  | > Found 8 match(es). Installing ...
19:47:45:369 [01240] | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d9.dll" ...
19:47:45:369 [01240] | INFO  | > Delayed.
19:47:45:369 [01240] | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d10.dll" ...
19:47:45:369 [01240] | INFO  | > Delayed.
19:47:45:369 [01240] | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d10_1.dll" ...
19:47:45:369 [01240] | INFO  | > Delayed.
19:47:45:369 [01240] | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d11.dll" ...
19:47:45:369 [01240] | INFO  | > Delayed.
19:47:45:369 [01240] | INFO  | Registering hooks for "C:\WINDOWS\system32\d3d12.dll" ...
19:47:45:369 [01240] | INFO  | > Delayed.
19:47:45:369 [01240] | INFO  | Registering hooks for "C:\WINDOWS\system32\dxgi.dll" ...
19:47:45:369 [01240] | INFO  | > Libraries loaded.
19:47:45:369 [01240] | INFO  | > Found 7 match(es). Installing ...
19:47:45:385 [01240] | INFO  | Registering hooks for "C:\WINDOWS\system32\opengl32.dll" ...
19:47:45:385 [01240] | INFO  | > Delayed.
19:47:45:385 [01240] | INFO  | Initialized.
19:47:45:385 [01240] | INFO  | Redirecting vkCreateInstance(pCreateInfo = 000000A296BFE380, pAllocator = 0000000000000000, pInstance = 000000A296BFE4E0) ...
19:47:45:667 [01240] | INFO  | Redirecting vkDestroyInstance(instance = 0000025BE5E98000, pAllocator = 0000000000000000) ...
19:47:45:667 [01240] | INFO  | Exiting ...
19:47:45:667 [01240] | INFO  | Uninstalling 32 hook(s) ...
19:47:45:667 [01240] | INFO  | Exited.
I am far away from being a ReShade expert but this seems weird to me? I did not point towards Vivaldi at any point in the install process. Yet, somehow ReShade is confusing processes or something like that? Vivaldi is open, the game is run and ReShade is trying to do it's stuff on Vivaldi instead of the game.

Update: this log file is also created with *only* Vivaldi running, so the game has not to be active to trigger it? I deleted the log file, never did run a game, yet a new log files was created, again with Vivaldi in it.
Last edit: 9 months 1 week ago by Vreem. Reason: Extra info
The topic has been locked.
More
9 months 1 week ago #9 by Wicked Sick
Replied by Wicked Sick on topic 4.5
Crossire, thanks again. No Man's Sky is running very well in comparison with the last release.
The topic has been locked.
More
9 months 1 week ago #10 by MonarchX
Replied by MonarchX on topic 4.5
Thank you sooo much!
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #11 by Birdy62
Replied by Birdy62 on topic 4.5
Thak you very much for the release.

Small problem with RDR2. I am using Dx12 with this game and i have a crash if the "Enable Reshade in Vulkan globally" is selected. If i usew the reshade API, it is ok.
Last edit: 9 months 1 week ago by Birdy62.
The topic has been locked.
More
9 months 1 week ago #12 by thalixte
Replied by thalixte on topic 4.5

Birdy62 wrote: Thak you very much for the release.

Small prioble with RDR2. I am using Dx12 with this game and i have a crash if the "Enable Reshade in Vulkan globally" is selected. If i usew the reshade API, it is ok.


If you use the DX12 API for RDR2, when you run the Reshade setup, you must choose the DX10/11/12 option, not the vulkan one.
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #13 by Birdy62
Replied by Birdy62 on topic 4.5

thalixte wrote:

Birdy62 wrote: Thak you very much for the release.

Small prioble with RDR2. I am using Dx12 with this game and i have a crash if the "Enable Reshade in Vulkan globally" is selected. If i usew the reshade API, it is ok.


If you use the DX12 API for RDR2, when you run the Reshade setup, you must choose the DX10/11/12 option, not the vulkan one.


Sure.. thats what i did... but the game crash at startup if the Vulkan global option is selected (I was installing Reshade on Rage2). If it's not, the game start normally with the Dx12 Reshade..
Last edit: 9 months 1 week ago by Birdy62.
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #14 by Vex
Replied by Vex on topic 4.5
as far as i can tell, the only other vulkan game besides rdr2 (dont have so havent tested) and no mans sky that seems to work is Rage 2, wolfenstein young blood and the new colossus both crash before the main menu, but the reshade text does come up when you load the game, heres hoping you get these two games fixed soon, they're unplayable without reshade ;)
Last edit: 9 months 1 week ago by Vex.
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #15 by Vrky07
Replied by Vrky07 on topic 4.5
4.5 is geting its Depth Buffer cleared and in turn you lose the readings for that resolution,It can not be fixed from in-game menu or anywhere else.
It is tied to loading in a level,so when the 4.5 gets new Depth and losses the old one it messes something up and it cant get Depth anymore.
DX9 only.

4.4 never had these issues.

/////////////////////////////
Edit:Fixed it,thank you!
Last edit: 9 months 1 week ago by Vrky07.
The topic has been locked.
More
9 months 1 week ago #16 by lowenz
Replied by lowenz on topic 4.5

Carl_P wrote: Oustanding work, really appreciated. Thanks! :)

+1

DB retrieval in D3D11 seems perfect now! (DXHR DC is perfectly working with MXAO).
The topic has been locked.
More
9 months 1 week ago #17 by brussell
Replied by brussell on topic 4.5
I have a strange problem with Reshade 4.5 using discard. I've made a dedicated thread here: reshade.me/forum/troubleshooting/6050-st...ard-with-reshade-4-5
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #18 by crubino
Replied by crubino on topic 4.5
YEEE-HAWWWW!!!!

Finally RDR2 can run so smooth with Vulkan! :woohoo: :woohoo:

Thank you, Crosire and Thalixte!!

Last edit: 9 months 1 week ago by crubino.
The topic has been locked.
More
9 months 1 week ago #19 by Vreem
Replied by Vreem on topic 4.5

crubino wrote: YEEE-HAWWWW!!!!

Finally RDR2 can run so smooth with Vulkan! :woohoo: :woohoo:

Thank you, Crosire and Thalixte!!


How?? Here there happens absolutely nothing? Which version of RDR2 you have? Steam, Epic, Rockstar Game Launcher?
The topic has been locked.
More
9 months 1 week ago - 9 months 1 week ago #20 by crubino
Replied by crubino on topic 4.5

Vreem wrote: How?? Here there happens absolutely nothing? Which version of RDR2 you have? Steam, Epic, Rockstar Game Launcher?


I'm using Epic Launcher, RDR2 product version = 1.0.1232.13
But my friend just reported, He currently using R* Launcher and works fine!
All you have to do is enable "Reshade Vulkan Globally" and then put the related file to proper folder inside C:\Users\<your-username>\AppData\Local\ReShade

You may read my simple tutorial here:
www.nexusmods.com/reddeadredemption2/mods/137

Update:
I've uploaded a quick video preview in YouTube to prove it:
Last edit: 9 months 1 week ago by crubino.
The topic has been locked.