Display Clipping Pixels

  • FierySwordswoman
  • Topic Author
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.
Last edit: 6 years 7 months ago by FierySwordswoman.

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

  • crosire
More
6 years 7 months ago #2 by crosire Replied by crosire on topic Display Clipping Pixels
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
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
More
6 years 7 months ago #4 by brussell Replied by brussell on topic Display Clipping Pixels
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
More
6 years 7 months ago #5 by crosire Replied by crosire on topic Display Clipping Pixels
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.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.