Search Unity

Accessing Blurred Scene Textures from SSR Component?

Discussion in 'Image Effects' started by Deleted User, Apr 25, 2017.

  1. Deleted User

    Deleted User

    Guest

    I'm writing a custom shader and I want to be able to re-use the screen-space blurred textures used by the SSR component for faked PBR reflections based on surface roughness.

    I found that the component script writes to the sampler2d properties of the SSR shader, they're tracked in the script by an array of shader property IDs which is instantiated here:

    https://github.com/Unity-Technologi...ponents/ScreenSpaceReflectionComponent.cs#L88

    I think that these blurred textures would be valuable if they were available to all components of the Image Effect stack as they can be created once per frame and reused where needed.

    In the meantime, I wanted to ask: What the easiest way would be to get access to these textures and set them in the properties of my custom shader?

    Thanks!