Display Clipping Pixels
- FierySwordswoman
- Topic Author
Less
More
6 years 7 months ago - 6 years 7 months ago #1
by FierySwordswoman
Display Clipping Pixels was created by FierySwordswoman
Pretty straightforward. Any clipping whites get replaced with pure red, and any clipping blacks get replaced with pure blue. It's a really handy tool to make sure your lightness-related changes aren't dumb.
It's probably really easy to do, but I know jack about HLSL, hence the request thread.
It's probably really easy to do, but I know jack about HLSL, hence the request thread.
Last edit: 6 years 7 months ago by FierySwordswoman.
Please Log in or Create an account to join the conversation.
- crosire
Less
More
CeeJay wrote this exact shader a while back, but I don't know if it ever got published somewhere. It's a really trivial effect. Will check if I can dig it up later or put it together myself quickly.
Please Log in or Create an account to join the conversation.
- FierySwordswoman
- Topic Author
Less
More
6 years 7 months ago #3
by FierySwordswoman
Replied by FierySwordswoman on topic Display Clipping Pixels
Hm. I should probably just learn this stuff since I encounter it so much both here and with ENB. No idea where to start, though...
Please Log in or Create an account to join the conversation.
- brussell
Less
More
My take:
...
float threshold = 0.00000001;
color.rgb = pow(dot(tex2D(ReShade::BackBuffer, texcoord).rgb,0.333),2.0) < threshold ? float3(0.0,0.0,1.0) : color.rgb;
color.rgb = pow(dot(1.0-tex2D(ReShade::BackBuffer, texcoord).rgb,0.333),2.0) < threshold ? float3(1.0,0.0,0.0) : color.rgb;
...
Please Log in or Create an account to join the conversation.
- crosire
Less
More
Problem is you basically have to add the code to whatever shader it is that may cause clipping, since after the information is written to the backbuffer, it's already clipped. It's not really something that can be added as a separate effect in ReShade 3. It worked in SweetFX, since all effects are calculated in the same pass without intermediate output back to the backbuffer.
Please Log in or Create an account to join the conversation.