Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Highpass using Sample Texture 2D LOD

Discussion in 'Shader Graph' started by Win3xploder, Jan 15, 2021.

  1. Win3xploder


    Dec 5, 2014
    I am doing a highpass by sampling a texture twice, the second time using a LOD sampler set to a higher LOD value and then subtracting the blurry LOD level (approx. the average color) from the regular texture.
    I then add a new color, replacing the old average color.

    I find that this approach causes sharply increased contrast in the diffuse color as well as wrong colors in the result, does anyone have an idea how to improve this?

    The application for this technique is to replace the average color on a texture within a shader (without editing the texture in an image editor).