How would I add a depth based edge mask to a shader?

  • aaronth07
  • Topic Author
More
3 years 10 months ago #1 by aaronth07 How would I add a depth based edge mask to a shader? was created by aaronth07
I would like a Chromatic Aberration shader that applies to the entire screen, but instead of applied to everything, I would like it to only apply to edges. Other shaders like SMAA and Filmic Sharpen already can detect the edges from the depth buffer, but in the case of Filmic Sharpen, it applied to everything but edges (I would like the opposite, for it to be applied to edges). What would I have to do to modify the current Chromatic Aberration shader (ChromaticAberration.fx not Prism.fx) to detect the edges based on the depth buffer and only apply the chromatic aberration to those edges?

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.