Daltonize Shader
- TreppenBananenHutstaender
- Topic Author
Less
More
8 years 5 months ago #1
by TreppenBananenHutstaender
Daltonize Shader was created by TreppenBananenHutstaender
Could someone port this Shader to ReShade Framework tried it myself but it didnt work:
/*-----------------------------------------------------------.
/ ColorBlind correction /
'-----------------------------------------------------------*/
// Daltonize (source http://www.daltonize.org/search/label/Daltonize)
float4 Daltonize( float4 input, float2 tex )
{
// RGB to LMS matrix conversion
float3 L = (17.8824f * input.r) + (43.5161f * input.g) + (4.11935f * input.b);
float3 M = (3.45565f * input.r) + (27.1554f * input.g) + (3.86714f * input.b);
float3 S = (0.0299566f * input.r) + (0.184309f * input.g) + (1.46709f * input.b);
// Simulate color blindness
#if ( Daltonize_type == 1) // Protanopia - reds are greatly reduced (1% men)
float l = 0.0f * L + 2.02344f * M + -2.52581f * S;
float m = 0.0f * L + 1.0f * M + 0.0f * S;
float s = 0.0f * L + 0.0f * M + 1.0f * S;
#endif
#if ( Daltonize_type == 2) // Deuteranopia - greens are greatly reduced (1% men)
float l = 1.0f * L + 0.0f * M + 0.0f * S;
float m = 0.494207f * L + 0.0f * M + 1.24827f * S;
float s = 0.0f * L + 0.0f * M + 1.0f * S;
#endif
#if ( Daltonize_type == 3) // Tritanopia - blues are greatly reduced (0.003% population)
float l = 1.0f * L + 0.0f * M + 0.0f * S;
float m = 0.0f * L + 1.0f * M + 0.0f * S;
float s = -0.395913f * L + 0.801109f * M + 0.0f * S;
#endif
// LMS to RGB matrix conversion
float4 error;
error.r = (0.0809444479f * l) + (-0.130504409f * m) + (0.116721066f * s);
error.g = (-0.0102485335f * l) + (0.0540193266f * m) + (-0.113614708f * s);
error.b = (-0.000365296938f * l) + (-0.00412161469f * m) + (0.693511405f * s);
error.a = 1;
// Isolate invisible colors to color vision deficiency (calculate error matrix)
error = (input - error);
// Shift colors towards visible spectrum (apply error modifications)
float4 correction;
correction.r = 0; // (error.r * 0.0) + (error.g * 0.0) + (error.b * 0.0);
correction.g = (error.r * 0.7) + (error.g * 1.0); // + (error.b * 0.0);
correction.b = (error.r * 0.7) + (error.b * 1.0); // + (error.g * 0.0);
// Add compensation to original values
correction = input + correction;
correction.a = input.a;
return correction.rgba;
}
Please Log in or Create an account to join the conversation.
- Iddqd
Less
More
Link :
www.dropbox.com/s/l0qsntegdvdvawj/Daltonize.zip?dl=0
But in mediator you cant enable i dont know why
You need enable effect in cfg manually
Installation: Copy lines and effect in arhive to you Framework
But in mediator you cant enable i dont know why
You need enable effect in cfg manually
Installation: Copy lines and effect in arhive to you Framework
Please Log in or Create an account to join the conversation.
- TreppenBananenHutstaender
- Topic Author
Less
More
8 years 5 months ago #3
by TreppenBananenHutstaender
Replied by TreppenBananenHutstaender on topic Daltonize Shader
it's not working for me here is the log:
Warning: Spoiler!
28/10/2015 16:32:52:533 [06796] | INFO | Initializing Crosire's ReShade version '1.0.0.915' built on '2015-08-10 01:52:59' loaded from "D:\Games\Glyph\Games\Trove\Live\dxgi.dll" to "D:\Games\Glyph\Games\Trove\Live\trove.exe" ...
28/10/2015 16:32:52:598 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d8.dll" ...
28/10/2015 16:32:52:599 [06796] | INFO | > Delayed.
28/10/2015 16:32:52:599 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d9.dll" ...
28/10/2015 16:32:52:599 [06796] | INFO | > Delayed.
28/10/2015 16:32:52:599 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d10.dll" ...
28/10/2015 16:32:52:599 [06796] | INFO | > Delayed.
28/10/2015 16:32:52:599 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d10_1.dll" ...
28/10/2015 16:32:52:599 [06796] | INFO | > Delayed.
28/10/2015 16:32:52:599 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\d3d11.dll" ...
28/10/2015 16:32:52:599 [06796] | INFO | > Libraries loaded.
28/10/2015 16:32:52:600 [06796] | INFO | > Found 2 match(es). Installing ...
28/10/2015 16:32:52:633 [06796] | INFO | > Installed 2 hook(s).
28/10/2015 16:32:52:633 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\dxgi.dll" ...
28/10/2015 16:32:52:633 [06796] | INFO | > Delayed.
28/10/2015 16:32:52:633 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\opengl32.dll" ...
28/10/2015 16:32:52:633 [06796] | INFO | > Libraries loaded.
28/10/2015 16:32:52:637 [06796] | INFO | > Found 360 match(es). Installing ...
28/10/2015 16:32:58:053 [06796] | INFO | > Installed 360 hook(s).
28/10/2015 16:32:58:053 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\user32.dll" ...
28/10/2015 16:32:58:053 [06796] | INFO | > Libraries loaded.
28/10/2015 16:32:58:067 [06796] | INFO | > Found 5 match(es). Installing ...
28/10/2015 16:32:58:143 [06796] | INFO | > Installed 5 hook(s).
28/10/2015 16:32:58:143 [06796] | INFO | Registering hooks for "C:\WINDOWS\system32\ws2_32.dll" ...
28/10/2015 16:32:58:143 [06796] | INFO | > Libraries loaded.
28/10/2015 16:32:58:146 [06796] | INFO | > Found 8 match(es). Installing ...
28/10/2015 16:32:58:267 [06796] | INFO | > Installed 8 hook(s).
28/10/2015 16:32:58:267 [06796] | INFO | Initialized.
28/10/2015 16:32:58:424 [06796] | INFO | Redirecting 'RegisterClassW(00D5F964)' ...
28/10/2015 16:32:58:424 [06796] | INFO | > Adding 'CS_OWNDC' window class style flag to 'SDLHelperWindowInputCatcher'.
28/10/2015 16:32:58:428 [06796] | INFO | Installing delayed hooks for "C:\WINDOWS\system32\dxgi.dll" ...
28/10/2015 16:32:58:428 [06796] | INFO | > Found 7 match(es). Installing ...
28/10/2015 16:32:58:428 [06796] | INFO | > Installed 7 hook(s).
28/10/2015 16:32:58:431 [06796] | INFO | Redirecting 'RegisterClassW(00D5F930)' ...
28/10/2015 16:32:58:431 [06796] | INFO | > Adding 'CS_OWNDC' window class style flag to 'SDL_app'.
28/10/2015 16:32:58:478 [09380] | INFO | Redirecting 'RegisterClassExW(03D1F780)' ...
28/10/2015 16:32:58:478 [09380] | INFO | > Adding 'CS_OWNDC' window class style flag to 'Message'.
28/10/2015 16:32:58:558 [06796] | INFO | Redirecting 'D3D11CreateDeviceAndSwapChain(00000000, 1, 00000000, 0, 00D5F7C8, 1, 7, 00D5F76C, 02D2C814, 02D2C824, 02D2C820, 02D2C818)' ...
28/10/2015 16:32:58:558 [06796] | INFO | Redirecting 'CreateDXGIFactory2(2147483648, {7B7166EC-21C7-44AE-B21A-C9AE321AE369}, 00D5F2C8)' ...
28/10/2015 16:32:58:590 [06796] | INFO | Redirecting 'IDXGIFactory::CreateSwapChain(01035640, 0487DA78, 00D5F76C, 02D2C814)' ...
28/10/2015 16:32:58:595 [06796] | INFO | Recreated effect environment on runtime 08AFF228.
28/10/2015 16:32:58:615 [06796] | INFO | Redirecting 'CreateDXGIFactory({7B7166EC-21C7-44AE-B21A-C9AE321AE369}, 00D5F3F0)' ...
28/10/2015 16:32:59:931 [06796] | INFO | Redirecting 'IDXGISwapChain::ResizeBuffers(08BF9CF8, 0, 0, 0, 28, 0x2)' ...
28/10/2015 16:32:59:933 [06796] | INFO | Recreated effect environment on runtime 08AFF228.
28/10/2015 16:33:00:169 [06796] | INFO | Redirecting 'IDXGISwapChain::ResizeBuffers(08BF9CF8, 0, 0, 0, 28, 0x2)' ...
28/10/2015 16:33:00:171 [06796] | INFO | Recreated effect environment on runtime 08AFF228.
28/10/2015 16:33:00:281 [06796] | INFO | Loading effect from "D:\Games\Glyph\Games\Trove\Live\ReShade.fx" ...
28/10/2015 16:33:00:476 [06796] | ERROR | Failed to compile effect on context 08AFF228:
D:\Games\Glyph\Games\Trove\Live\Shader@0x0EE7C018(88,10): error X4000: variable 'Daltl' used without having been completely initialized
D:\Games\Glyph\Games\Trove\Live\Shader@0x0EE7C018(88,10): error X4000: variable 'Daltm' used without having been completely initialized
D:\Games\Glyph\Games\Trove\Live\Shader@0x0EE7C018(88,10): error X4000: variable 'Dalts' used without having been completely initialized
Please Log in or Create an account to join the conversation.
- Iddqd
Less
More
Try this version of shader :
www.dropbox.com/s/ayg0fgdr1s5hsu8/DaltonizeFX.zip?dl=0
Please Log in or Create an account to join the conversation.