4.8

More
1 month 2 days ago - 1 week 3 days ago #1 by crosire
4.8 was created by crosire
Changelog

4.8.0:
  • Added compute shader support to ReShade FX shader language, supported in D3D11, D3D12, OpenGL and Vulkan. Example:
    #include "ReShade.fxh"
    
    texture testTex { Width = 32 * 2; Height = 1024; Format = RGBA8; };
    storage testStore { Texture = testTex; };
    sampler testSample { Texture = testTex; MinFilter = POINT; MagFilter = POINT; };
    
    groupshared float test[32];
    
    void Test_CS(uint3 id : SV_DispatchThreadID, uint3 tid : SV_GroupThreadID)
    {
    	test[tid.x] = id.x / 32.0;
    	barrier();
    	if (tid.x % 2 == 0)
    		test[tid.x] += test[tid.x + 1];
    	else
    		test[tid.x] = 1;
    	barrier();
    	tex2Dstore(testStore, id.xy, float4(test[tid.x].xxx, 1));
    }
    
    float3 Final_PS(float4 vpos : SV_Position, float2 texcoord : TexCoord) : SV_Target
    {
    	return tex2D(testSample, texcoord).rgb;
    }
    
    technique Compute
    {
    	pass
    	{
    		// Specify the local thread group size as part of the compute shader assignment
    		// Format is "FunctionName<X, Y, Z>", but Z is optional
    		ComputeShader = Test_CS<32, 1>;
    		DispatchSizeX = 2;
    		DispatchSizeY = 1024;
    		// Can also add "DispatchSizeZ" for 3D-launches
    	}
    	pass
    	{
    		VertexShader = PostProcessVS;
    		PixelShader = Final_PS;
    	}
    }
  • Added option to not clear alpha channel of screenshots
  • Added option to include preset name in screenshot file name
  • Added JPEG as a screenshot format option
  • Added option to duplicate current preset when creating a new one
  • Added option to only load enabled effects
  • Added performance mode toggle keyboard shortcut
  • Added global option to force fullscreen mode in D3D, ReShade.ini:
    [D3D9] ; or [DXGI]
    ForceFullscreen=1
  • Added support for global config file to change base and module load path (instead of having to rely on environment variables). To use, ceate an INI file with the same name as the ReShade DLL (e.g. dxgi.ini) next to it, with these contents:
    [INSTALL]
    BasePath=path/ReShade/should/use/as/base/for/all/relative/paths
    ModulePath=path/ReShade/should/load/DLLs/from
  • Added position of separator between technique and variable list in UI to config (so it is persistent between runs)
  • Added technique context menu button to open containing folder in Windows explorer
  • Added category context menu button to reset all variables in that category to their default values
  • Added separate code viewer window, so one can view generated code and edit a shader simultaneously
  • Added editor support for "Shift + Tab" to remove line indentation without selection
  • Added editor support for paste on new line
  • Added visual indicator to text editor title when open document is unsaved
  • Added message to home tab when a texture failed to load
  • Added yellow highlight to items in the technique list where the underlying effect compiled with warnings and added those warnings to the tooltip
  • Added effect parser error when encountering multi-dimensional array
  • Added effect parser error when using sRGB sampling on back buffer but back buffer format is not RGBA8
  • Added effect parser error when static variable initializer is not a literal expression. This is a breaking change for some effects!
  • Added effect parser warning when specifying negative value for texture property
  • Added "tex2Dsize" intrinsic overload which takes a storage object (for compute shaders)
  • Added "barrier", "memoryBarrier" and "groupMemoryBarrier" intrinsics for use in compute shaders
  • Added atomic intrinsics "atomicAdd", "atomicAnd", "atomicOr", "atomicXor", "atomicMin", "atomicMax", "atomicExchange" and "atomicCompareExchange"
  • Added support for "SV_IsFrontFace" semantic to GLSL/SPIR-V code generation
  • Added support for "min16int", "min16uint" and "min16float" scalar and vector types
  • Added "mousewheel" source for uniform variables to use mouse wheel input
    // Value starts at 1.0. When user moves the mouse wheel up, it goes up, but not past 10.0.
    // When user moves the mouse wheel down it goes down, but not past 0.0.
    uniform float value < source = "mousewheel"; min = 0.0; max = 10.0; step = 1.0; > = 1.0;
    // You can also add a second component, which then holds the current wheel state
    // (How much the wheel was moved this frame):
    // So value.y is +1 when wheel went up, or -1 when it went down
    uniform float2 value < source = "mousewheel"; ... >;
  • Added "overlay_active" and "overlay_hovered" source to uniform variables, which hold the index (from the top in the effect file) of the UI widget the user is currently entering a value in or hovering in the UI
    uniform float value1 < ui_type = "drag"; >;
    uniform float value2 < ui_type = "slider"; >;
    
    // Is zero by default, 1 when "value1" is being modified, 2 when "value2" is being modified
    uniform int active < source = "overlay_active"; >;
    // Is zero by default, 1 when mouse cursor is over "value1" in UI and 2 when it is over "value2"
    uniform int hovered < source = "overlay_hovered"; >;
  • Added more verbose logging in case of D3D10/11 resource creation failures
  • Added pass names for passes writing to a texture on the statistics page
  • Added device and driver information to UI in OpenGL
  • Added support for comma character in INI elements
  • Added path text box to app selection in setup tool
  • Added different sort modes to app selection in setup tool
  • Added button to add custom effect package to setup tool
  • Added option to skip individual effect selection using three state checkboxes to setup tool
  • Added setup tool archive validation when opening it
  • Added standard Epic Games Launcher install location to setup tool search paths
  • Added heuristic to setup tool that chooses the depth reversed setting based on the year a game came out
  • Added error to setup tool when installing to an application that already has ReShade installed via a different render API
  • Added notice on how to uninstall to final setup tool screen
  • Added signature to setup tool
  • Improved file and directory selection dialogs (including the preset selection) and added icons
  • Improved format of variable names in generated GLSL code for better readability
  • Improved effect parser error recovery for errors inside struct definitions
  • Improved speed of setup tool application detection
  • Changed INI option names for a cleaner look! The setup tool will update them when installing over an existing config, but be aware of this when doing a manual update, since some of your settings may get lost.
  • Changed preset path option to save as a relative path to the ReShade DLL if preset is in the same or a subdirectory
  • Changed "tex2Dfetch" intrinsic to accept coordinates without a mipmap level and added seprate overload which accepts a mipmap level. This is a breaking change, so make sure to update your shaders (it will continue to compile with warnings in most cases, since int4 can be implicitly casted to int2, but only behaves the same then if the passed in mipmap level was zero)!
    // The declarations now look like this:
    float4 tex2Dfetch(sampler2D s, int2 coords);
    float4 tex2Dfetch(sampler2D s, int2 coords, int lod);
  • Changed D3D9 depth buffer detection logic to always run independently on each frame (fixes flickering in some games, like RE4 Remastered HD)
  • Changed splash banner to disappear immediately after reloading finished on all reloads except the first one
  • Changed assembly viewer text to get updated after an effect finished compiling
  • Changed HLSL compilation to enable highest optimization level only when performance mode is active
  • Changed configuration to save and restore custom style independently of the fixed presets (so its not lost when switching between those)
  • Changed keyboard shortcuts to be inactive while typing into text boxes
  • Changed item width for variable editor UI widgets
  • Changed texture name reservation to only run in OpenGL compatibility contexts by default
  • Changed default preset file name to "ReShadePreset.ini"
  • Changed setup tool to install to "bin" directory if one exists next to the executable (for Source Engine games)
  • Fixed mouse button double clicks not registering
  • Fixed red and blue color channel being switched in D3D12 screenshots in some applications
  • Fixed hang in Vulkan games because fence completion check was comparing against wrong return value
  • Fixed partial screen updates in D3D9 messing up ReShade rendering (e.g. in IL-2 Cliffs of Dover)
  • Fixed hooks not being installed in applications that call "LoadLibraryExA/W" with flags (e.g. Prey)
  • Fixed duplicated D3D10/D3D11 hooks (since the D3D10 driver may use D3D11 internally)
  • Fixed D3D9 depth surface replacement messing up games using INTZ format themselves (e.g. Dead Space)
  • Fixed artifacts in D3D9 games using partial depth buffer clears
  • Fixed artifacts in OpenGL games using GL_ALPHA_TEST
  • Fixed unbound key shortcuts potentially triggering if application sends input messages for key code zero
  • Fixed crash if application calls "ID3D11Device::CreateShaderResourceView" and similar with a nullptr resource (e.g. in Snowrunner)
  • Fixed crash when application unloads ReShade while a thread is still calling "GetMessage" (e.g. in Dolphin)
  • Fixed crash in Vulkan when data race occurs after multiple threads failed to access a value from a lockfree table (e.g. in Baldur's Gate)
  • Fixed crash if font atlas creation fails
  • Fixed crash when parsing ReShade FX code that attempts a function call outside of a function
  • Fixed crash if ReShade FX code contains shader function with an output parameter or return value without a semantic
  • Fixed crash when pressing "Shift + Tab" in editor with a line that has only spaces selected
  • Fixed R8 and RG8 textures having an alpha value in D3D9
  • Fixed wrong render targets being set in D3D12 if effect contains multiple techniques
  • Fixed primitive topologies other than triangles not working in OpenGL
  • Fixed "tex2Dstore" intrinsic writing with a slight offset in OpenGL
  • Fixed precision of floating-point constants in generated HLSL/GLSL code
  • Fixed preprocessor removing spaces in macro arguments
  • Fixed preprocessor not trimming all whitespace before and after macro arguments and around concatenation operator
  • Fixed preprocessor not adding adding backslashes to escape quotes in stringize operator
  • Fixed code generation for switch statements with multiple cases pointing to the same block
  • Fixed SPIR-V code generation for struct member accesses on function return values
  • Fixed SPIR-V code generation for struct input parameters
  • Fixed SPIR-V code generation for switch statements that contain branches
  • Fixed SPIR-V code generation for "inout" function parameters with semantics and arrays
  • Fixed HLSL code generation for global "static" variables
  • Fixed HLSL code generation for loops on uniform variables in shader model 3
  • Fixed missing interpolation qualifiers in generated GLSL code for struct return values
  • Fixed location calculation for GLSL array input and output variables
  • Fixed GLSL code generation for "inout" function parameters with semantics
  • Fixed GLSL code generation for shaders that have multiple input or output parameters with the same semantic
  • Fixed effect parser error when initialization array of structs using initializer list syntax
  • Fixed incorrect FreePIE uniform data padding
  • Fixed "timeout" annotation on techniques for very small values (so one can now set it to "1" to only have the technique run a single time)
  • Fixed division by zero if min/max are switched for "random" uniform source
  • Fixed user being able to enter invalid characters as a preprocessor macro name
  • Fixed dragging technique to a new location not preserving order of the others
  • Fixed editor font affecting search and replace buttons
  • Fixed pooled textures not always showing up on statistics page
  • Fixed double click behavior on app selection list in setup tool (it now only reacts if the same item is clicked twice)
  • Removed "tex2Dgather" intrinsic and instead split it into separate variants for each component:
    float4 tex2DgatherR(sampler2D s, float2 coords); // equal to previous "tex2Dgather(s, coords, 0);"
    float4 tex2DgatherG(sampler2D s, float2 coords); // equal to previous "tex2Dgather(s, coords, 1);"
    float4 tex2DgatherB(sampler2D s, float2 coords); // equal to previous "tex2Dgather(s, coords, 2);"
    float4 tex2DgatherA(sampler2D s, float2 coords); // equal to previous "tex2Dgather(s, coords, 3);"
  • Removed separate "tex2D[...]offset" texture intrinsics and instead made them overloads
    float4 tex2D(sampler2D s, float2 coords);
    float4 tex2D(sampler2D s, float2 coords, int2 offset);
    float4 tex2Dlod(sampler2D s, float4 coords);
    float4 tex2Dlod(sampler2D s, float4 coords, int2 offset);
    float4 tex2DgatherR(sampler2D s, float2 coords);
    float4 tex2DgatherR(sampler2D s, float2 coords, int2 offset);
    ...
  • Removed technique percentage numbers from statistics (since they where commonly misunderstood)
  • Removed support for "POSITION", "VPOS" and "DEPTH" input semantics (use "SV_Position" and "SV_Depth" instead)
  • Removed error limit again since it can hide errors behind a lot of warnings

4.8.1:
  • Added automatic texture reference tracking to effect compiler (it now knows which passes use which textures)
  • Improved performance of compute passes
  • Improved OpenGL effect rendering performance
  • Changed compiler to remove "static" qualifier from local variables to fix some effects failing to compile since the 4.8 update
  • Changed sRGB sampling check on back buffer to a warning instead of an error
  • Changed reference display for textures on the statistics page to a more detailed break down of where and how they are used
  • Changed cycle order of effect package checkboxes in setup tool
  • Fixed docking windows to other windows not working
  • Fixed compute shaders not being able to read from textures also used as storage
  • Fixed GLSL code generation not removing all duplicated underscore symbols in names
  • Fixed Vulkan textures not being cleared to zero on creation
  • Fixed OpenGL mipmaps looking slightly different than in the other APIs
  • Fixed crash on startup with RenderDoc attached
  • Fixed screenshot with overlay not being created for preview texture window
  • Fixed texture load failure message listing all textures of disabled effects too
  • Fixed setup tool installing to the wrong directory for "Vampire: The Masquerade" game

4.8.2:
  • Added missing hooks for "Direct3DCreate9on12" and "DXGIDeclareAdapterRemovalSupport"
  • Fixed crash when effects use pooled textures
  • Fixed crash in D3D9 games that have Windows compatibility fixes active (ReShade now finally works in SWTOR, when correctly installed as d3d9.dll!)
  • Fixed artifacts and depth buffer detection in the first "The Witcher" game
  • Removed global settings ("ForceFullscreen", "Force10BitFormat", etc.) from ReShade.ini and instead moved those into [ReShade DLL Name].ini (e.g. d3d9.ini/dxgi.ini/opengl32.ini) file
    [APP]
    ForceVSync=0
    ForceWindowed=0
    ForceFullscreen=0
    ForceResolution=0,0
    Force10BitFormat=0
Last edit: 1 week 3 days ago by crosire.
The following user(s) said Thank You: lowenz, Wicked Sick, Pondural, brussell, conan2k, OtisInf, Krasius, MakeNX, Echo, Ryukou36 and 16 other people also said thanks.

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

More
1 month 2 days ago #2 by Wicked Sick
Replied by Wicked Sick on topic 4.8
Thanks, Crosire.
The following user(s) said Thank You: crosire

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

More
1 month 2 days ago #3 by ExodusV
Replied by ExodusV on topic 4.8
"WARNING: This update has some breaking changes that require updates from shader maintainers (and therefore not all your installed effects may work until that has happened)!"

Does this mean it's up to those shader creators to update their shaders to be compatible with the new update?

Thanks for this!!

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

More
1 month 2 days ago #4 by crosire
Replied by crosire on topic 4.8
Yes. In most cases this already happened (since I gave notice to the authors before), but there may still be some out there that do not compile currently.

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

More
1 month 2 days ago #5 by Fu-Bama
Replied by Fu-Bama on topic 4.8
Very nice update. Thanks

There's an error in UI when you try to snap some tab to split view. The snapping indicators only sometimes show up. Behavior is inconsistent. I found this in OpenGL mode when trying to snap Log-tab to split view with Techniques list.

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

More
1 month 2 days ago #6 by Opprime
Replied by Opprime on topic 4.8
Thanks for your work but still the issues with the games that use the unity engine like Wasteland 3 or Iron Harvest.

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

More
1 month 2 days ago #7 by kokotas
Replied by kokotas on topic 4.8
What a beast! Thank you for updating this irreplaceable software.
The following user(s) said Thank You: crosire

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

More
1 month 2 days ago - 1 month 2 days ago #8 by BoredOtter
Replied by BoredOtter on topic 4.8
many of the effects normally installed, (as well as some new ones) are having compilation errors, specifically HDR and bloom effects, as well as a few others, EDIT: heres the reshade log:
Warning: Spoiler!
Last edit: 1 month 2 days ago by crosire. Reason: Added spoiler tags around log

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

More
1 month 2 days ago #9 by OtisInf
Replied by OtisInf on topic 4.8
BoredOtter: it might be wise to copy / paste that to pastebin and just post a link to that pastebin here instead of adding a LOT of text :)

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

More
1 month 2 days ago #10 by crosire
Replied by crosire on topic 4.8
Also kindly read the first line of the OT, which explains why this is happening.

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

More
1 month 2 days ago - 1 month 2 days ago #11 by lowenz
Replied by lowenz on topic 4.8
4.7 + d3d8to9 in Deux Ex Invisible War / Thief Deadly Shadows -> perfect depth buffer ("Depth Display" shader) using depth multiplier set to 2 + copy DB before clear operations

4.8 -> you can only see the Depth Buffer ROTATING (lol) the player camera. Standing still or WASD-moving=totally black screen

4.8 bug or "Depth Display" shader bug with 4.8?
Yes, I've updated the shader package (master+slim)
Last edit: 1 month 2 days ago by lowenz.

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

More
1 month 2 days ago #12 by crosire
Replied by crosire on topic 4.8

Changed D3D9 depth buffer detection logic to always run independently on each frame (fixes flickering in some games, like RE4 Remastered HD)

That pretty much changed how depth buffer detection works in D3D9 from ground up, so you may have to play with the settings on the D3D9 tab again.

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

More
1 month 2 days ago - 1 month 2 days ago #13 by lowenz
Replied by lowenz on topic 4.8
But the DB is detected (and yes, already I did check every option) but you can see it (with the shader) only moving the mouse (rotating the player camera) :|
Last edit: 1 month 2 days ago by lowenz.

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

More
1 month 2 days ago #14 by lowenz

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

More
1 month 2 days ago #15 by DaelosTheCat
Replied by DaelosTheCat on topic 4.8
Hello! I use ReShade with most games that I own. Just dropped by to thank everyone involved in its creation, maintaining, updates and making shaders. This is a godsend (which I'm sure you know). Thank you.
The following user(s) said Thank You: crosire

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

More
1 month 2 days ago #16 by villings
Replied by villings on topic 4.8
Thanks for the update(s)!
The following user(s) said Thank You: crosire

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

More
1 month 1 day ago #17 by Methos
Replied by Methos on topic 4.8
Thank you for the update, however in this version and upon installation I can't seem to choose just a few of the effects out of one of the packages leaving me no option but to install the entire package from which I just want one or two of the said effects (leaving me with a bunch of them that I never plan on using).

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

More
1 month 1 day ago #18 by lowenz
Replied by lowenz on topic 4.8

lowenz wrote: But the DB is detected (and yes, already I did check every option) but you can see it (with the shader) only moving the mouse (rotating the player camera) :|

Problem solved settin g in DXIW and TDS

DynVPMinRotationRate=0

in the defaul.ini file

So no ReShade or shader issue! Only old first XBox era optimizations!
The following user(s) said Thank You: crosire

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

More
1 month 1 day ago - 1 month 1 day ago #19 by Opprime
Replied by Opprime on topic 4.8
Thanks for the the update, but still the same issues with games that uses the unity engine like Wasteland 3 or Iron Harvest.
Last edit: 1 month 1 day ago by Opprime.

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

More
1 month 1 day ago - 1 month 1 day ago #20 by crosire
Replied by crosire on topic 4.8

Methos wrote: Thank you for the update, however in this version and upon installation I can't seem to choose just a few of the effects out of one of the packages leaving me no option but to install the entire package from which I just want one or two of the said effects (leaving me with a bunch of them that I never plan on using).

During package selection a filled out checkbox means the setup will ask you which individual effects to install. But a checkbox with a checkmark means it will install the entire package without prompting for individual selection again. So click on the checkboxes multiple times until they are filled out if you want the prompt to appear like before. This is explained in the help text at the bottom of the package selection dialog too.
Last edit: 1 month 1 day ago by crosire.
The following user(s) said Thank You: ModMe5015

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