Original Post
I am trying to find a way, how to optimalize my code and becuase i have to render scene depth from more viewpoints, i though, i can just render scene once and render depths to rendertargets.
I am curious, if it's really possible
I have tried to pass buffer with four ViewProjection matrixes, i transformed position with all matrices and in a pixel shader, i just divided positions with W component and store them in rendertarget.
Unfortunately every rendertarget contain same data, but different depths only. that's wrong.
I hope, there is a solution for that to avoid multiple scene renderings just becuase i need depth maps
Thank you very much
I am curious, if it's really possible
I have tried to pass buffer with four ViewProjection matrixes, i transformed position with all matrices and in a pixel shader, i just divided positions with W component and store them in rendertarget.
Unfortunately every rendertarget contain same data, but different depths only. that's wrong.
I hope, there is a solution for that to avoid multiple scene renderings just becuase i need depth maps
Thank you very much