Hi. Can each Shader pass read the previous one back as a sampler2D reference to itself?
I’ve tried it but it’s either not available or I’ve done something wrong.
Thank-you.
David.
Hi. Can each Shader pass read the previous one back as a sampler2D reference to itself?
I’ve tried it but it’s either not available or I’ve done something wrong.
Thank-you.
David.
As an example, I can’t do the following for some reason:-
Graphics.Blit(null, destTex, normalMaterial, 0);
Graphics.Blit(destTex, destTex, normalMaterial, 1);
I have to use two textures in the source and destination, even though it’s already been written to in the first pass?
Reading and writing to the same texture isn’t allowed. That’s not a Unity thing, that’s a general graphics thing.
Well, technically it is with DX11 & DX12 under very specific situations using the DX11 RWTextures, but Unity’s doesn’t really support them and they have significant limitations and often come with a performance penalty.
OK, that makes sense now, thanks loads - I was being daft.