Question by
MUGIK · Dec 25, 2016 at 01:42 PM ·
renderinglightrendertexturepipeline
CommandBuffer draw renderer to render texture in specific place and with light
Hi! I want to draw Renderer to RenderTexture in CommandBuffer with light, and draw only in specific place of RenderTexture. I tried to use the matrix(link) but did not get any results. (names of matrices: UNITY_MATRIX_V, UNITY_MATRIX_P, unity_CameraProjection) I imagine that it would look like this:
commandBuffer.SetRenderTarget(resultRenderTexture);
// maybe i need to set several matrices
commandBuffer.SetGlobalMatrix("wich Matrix I need", matrix);
commandBuffer.DrawRenderer(someRenderer, someMat);
But this doesnt work :(
commandbufferquastion.jpg
(52.3 kB)
Comment