Is there a way to fetch albedo/spec/roughness/AO and normals (RTs) in a deferred frag. shader?
The title pretty much covers it.
I want to create an opaque per-pixel fragment shader that:
Will be rendered after all normal opaque surfaces but before all transparent surfaces
Will have albedo, specular, smoothness, occlusion values and normals fetched from the deferred render targets (for each given pixel)
Will output those fetched RT values
Basically, this will make the shader completely invisible, as it will just write back the content of deferred render targets. This is the base I need to create proper UE4-like normal decals and some other stuff, but those are the easy part. What I need to figure out right now is how can I get that content from RTs. I'm unable to find anything about this in the documentation, but this should be possible - after all, Unity already offers a way to fetch values like linear eye depth, so asking to fetch something like smoothness is not exactly an exotic thing.
Can anyone help me out?
Your answer
Follow this Question
Related Questions
Fragment shader shows alpha, surface shader doesn't 0 Answers
Creating a 3D portal effect using stencil buffer with a deferred shading setup? 1 Answer
Why I couldnt control alpha in Surface shader? 3 Answers
Use a render texture with a particle system. (transparent background) 1 Answer
Making a pixelation shader to change resolutions in different areas of the screen 0 Answers