A shader that will work with ReShade / SweetFX dll injection. So you can use it as a custom shader in GTAV etc. if you'd like. It is designed to make things more visible in the dark. I have not made it all green this time. You will need to change inv_width and inv_height to fit your screen's resolution
/*-----------------------------------------------------------. / Custom / '-----------------------------------------------------------*/ /* */ #define CustomLuma float3(0.2126, 0.7152, 0.0722) /* Normal */ float4 normal(float2 texcoord : TEXCOORD0) { return tex2D(s0, texcoord); } /* Find Edges / Sobel */ float4 sobel(float2 texcoord : TEXCOORD0) { float inv_width = 1.0 / 1920; float inv_height = 1.0 / 1080; float4 top = tex2D(s0, float2(texcoord.x, texcoord.y + inv_height)); float4 bottom = tex2D(s0, float2(texcoord.x, texcoord.y - inv_height)); float4 left = tex2D(s0, float2(texcoord.x - inv_width, texcoord.y)); float4 right = tex2D(s0, float2(texcoord.x + inv_width, texcoord.y)); float4 tl = tex2D(s0, float2(texcoord.x - inv_width, texcoord.y + inv_height)); float4 tr = tex2D(s0, float2(texcoord.x + inv_width, texcoord.y + inv_height)); float4 bl = tex2D(s0, float2(texcoord.x - inv_width, texcoord.y - inv_height)); float4 br = tex2D(s0, float2(texcoord.x + inv_width, texcoord.y - inv_height)); float4 sx = -tl - 2 * left - bl + tr + 2 * right + br; float4 sy = -tl - 2 * top - tr + bl + 2 * bottom + br; float4 returnCol = sqrt(sx * sx + sy * sy); returnCol.w = 1.0; return returnCol; } float4 gamma_square_root(float4 input_colour) { float r, g, b; r = pow(input_colour.r, 0.5); g = pow(input_colour.g, 0.5); b = pow(input_colour.b, 0.5); return max(float4(r, g, b, 1.0), 0.0); } float3 CustomPass(float4 position : SV_Position, float2 texcoord : TEXCOORD0) : SV_Target { float4 out_colour; out_colour = gamma_square_root(normal(texcoord)) * (float4(1.0, 1.0, 1.0, 2.0) - sobel(texcoord)); return out_colour.rgb; }