- Home /
Drawing to an in-game screen
First post!
I realize I likely need to use Render to Texture or a script equivalent, but all I have seen regarding it so far is "copying" a camera's view and putting it on a surface. Is there anyway I could add images / shapes to the texture, similarly to drawing in DirectX or OpenGL?
Answer by Itaros · Nov 06, 2014 at 08:27 PM
Unity uses DX or OGL(depends on deployment target).
Yes, you can: you can setup additional stuff for camera layers to render it too or process resultant image by additional shader pass. The best bet is to check how built-in Image Effects are implemented: they blit resultant buffer image into temporary buffer and apply shader on it. You can write any program to modify outcome. You can also check RenderWithShader (http://docs.unity3d.com/ScriptReference/Camera.RenderWithShader.html) method if want to get special data from camera.
If you are looking for immediate mode replacement: check GL and Graphics classes
As someone new to Unity, could you do a quick rundown of how I might get started with that? Or point me to additional info. Help greatly appreciated!
http://docs.unity3d.com/$$anonymous$$anual/Layers.html - layers. Awesome feature. I personally use it to distinguish gameplay graphics and ui to apply effects separately using two cameras. http://docs.unity3d.com/ScriptReference/Graphics.html - pretty self explanatory.
Thanks! So I'm getting that you use a Graphics' setRenderTarget ( A RenderTexture )?
Your answer
Follow this Question
Related Questions
Assigning UV Map to model at runtime 0 Answers
how to create illumination mask texture loading script? (self-illuminated diffuse) 1 Answer
Need help with creating dynamic textures. 1 Answer
Load image into texture not working on Galaxy SIII 1 Answer
Dynamically loading textures to avoid memory problems 1 Answer