- Home /
No longer relevant for current version. Problem no longer exists with SRPs
Reading from Gbuffers 4-7 in a shader
I am trying to write a couple shaders that take advantage of the unused gbuffers for some image effects. I currently have a shader that is rendering to, amongst other things, GBuffer#5, by outputting a struct (similar to that you might see elsewhere for deferred shaders with color being assigned to SV_Target0, etc) that has a half4 : SV_Target5. My machine does support up to 8 MRTs, I checked using SystemInfo.
My question is, how do I read from GBuffer 5 in my image effects shader? sampling _CameraGBufferTexture doesnt seem to work for anything other than buffers 0-3 (not even buffer 4 which I know for a fact is written to as it is the shadowmap). There appears to be no sort of input semantic that can let me read from this buffer either. I looked into setting the render target with Graphics.SetRenderTarget and with CommandBuffers, neither of which seemed to work either.
BuiltinRenderTextureType.GBuffer5 seems to suggest that this buffer exists.
How do I read from these unused buffers?