render some quads in a cluster to define the appearence of a page (text, paper, images)
it’ll be 512x512 and I will need to change the contents of that each frame…
Confusion when it renders, how it renders, how to start and stop rendering it, and do it all via script in a way that doesn’t use anything in the scene, it is for a book.
Any ideas or links? I am just doing trial and error at the moment… thanks!
Thats impossible.
It has to be in the scene as rendering to RenderTexture (all on gpu) requires that the stuff is on the gpu and thats only the case for things in the scene. In the scene means its an instance of some form, even if its just a mesh reference and you use DrawMesh
But you can have them in a layer normally not visible to the camera and use the onXXXRender hooks for the camera to render to this render texture with explicit switch on the layer etc as you do it for all other post fx too (you can look at the pro image effects, especially the effect base class from which you might want to extend).
I am in a rush now but as dreamora said, it’s in the layer properties of the game object.
Specify the “Culling Mask” for the camera to be the same as the layer of objects you want to render. That camera will only render the objects on that layer. Then specify a Target Texture. Then call the Camera.Render function.
But the object has to be in the scene, but you can cull them out from the main camera using the culling mask.
Best you look at the Fullscreen Effects from Pro, they show you how to interact with them, cause what you want to do in the end is nothing but a ‘non fullscreen fullscreen effect’
Alternatively look at the Replacement Shader example you can download on how to do the controlled ‘once per frame’ render texture update and just kick out the replacement shader line in there basically replacing it with the culling mask change
generally all you need to do is:
set the render texture as the currently active one for the cam