Uint header = ( offsetXY > (a* 4)) & 0xF #if CMAA_PACK_SINGLE_SAMPLE_EDGE_TO_HALF_WIDTH != 0 #define CEIL_DIV(num, denom) (((num - 1) / denom) + 1) Static const lpfloat c_dampeningEffect = lpfloat( 0.15 ) Static const lpfloat c_dampeningEffect = lpfloat( 0.11 ) Static const lpfloat c_symmetr圜orrectionOffset = lpfloat( 0.22 ) these are blendZ settings, determined empirically :) #define g_CMAA2_SimpleShapeBlurinessAmount lpfloat( 0.10) #define g_CMAA2_LocalContrastAdaptationAmount lpfloat( 0.10) #define g_CMAA2_SimpleShapeBlurinessAmount lpfloat( 0.07) #define g_CMAA2_LocalContrastAdaptationAmount lpfloat( 0.15) #define CMAA_PACK_SINGLE_SAMPLE_EDGE_TO_HALF_WIDTH 0 // adds more ALU but reduces memory use for edges by half by packing two 4 bit edge info into one R8_UINT texel - helps on all HW except at really low res #define CMAA2_CS_OUTPUT_KERNEL_SIZE_Y (CMAA2_CS_INPUT_KERNEL_SIZE_Y- 2) #define CMAA2_CS_OUTPUT_KERNEL_SIZE_X (CMAA2_CS_INPUT_KERNEL_SIZE_X- 2) #define GroupMemoryBarrierWithGroupSync barrier
#Reshade 3.0 vs 2.0 code#
wrapping these rather than substituting - makes implementing missing features easier down the line if code is vanilla Textures, Samplers, Globals, Preprocessor settings Uniform float g_CMAA2_EdgeThreshold = 0.1
#Reshade 3.0 vs 2.0 full#
#define CMAA2_EDGE_DETECTION_LUMA_PATH 0 //0: full color 1: log luma in place (2 disabled as it's using luma from outside) CMAA2 tweaks that make sense to modify for user #define USE_FP16 0 //on RTX 3080, fp16 is slower than fp32, so disabled by default. #define WRITE_COLLISION_REVOLVER 1 //enable randomized writing of buffers Source code in this file, feel free to modify, add and build on top To facilitate later implementation of missing features,ĬMAA2_COLLECT_EXPAND_BLEND_ITEMS is removed entirely.Īs mentioned above, I do not claim any copyright to any of the present I removed those features that will never be used on ReShadeīut left the rest of the code as vanilla as possible
![reshade 3.0 vs 2.0 reshade 3.0 vs 2.0](https://img.gta5-mods.com/q75/images/vivid-v-for-reshade-3-0/3fd02b-on1_9Ask9Qz.png)
Using some napkin math, I decided that 4 buffers is sufficient. This only lowers the probability of collisions and does not solve them. Multiple different buffers and blending these at the end. Results are lowered performance and write race conditions, manifestingĪ workaround for the second problem is randomizing the writes to
![reshade 3.0 vs 2.0 reshade 3.0 vs 2.0](https://li1.modland.net/euro-truck-simulator-2/other/reshade-3-0-1-3-0-7-by-crosire-1-27-x_6_ModLandNet.jpg)
ReShade is missing most of the features CMAA2 uses for acceleration.
![reshade 3.0 vs 2.0 reshade 3.0 vs 2.0](https://i.imgur.com/uNxPSKr.jpg)
I do not claim any copyright to any of the work used in this productĬMAA2 (Copyright (c) 2018, Intel Corporation) is licensed under Rough port of CMAA2 to ReShade by Pascal Gilcher