How would I add a depth based edge mask to a shader?
- Topic Author
- Posts: 67
3 weeks 6 days ago #1 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?