- Home /
Is unity uses rendering from the cpu or gpu ?
Is unity uses rendering from the cpu or gpu ?
Answer by aldonaletto · Jul 01, 2017 at 05:59 PM
The GPU does the hard work. All objects that are going to be rendered are ultimately meshes composed by lots of triangles and some textures used to paint them (and to add some details, like bump maps, occlusion maps etc.). Unity (CPU) selects which objects are candidates to be rendered, then sends them one by one to the GPU: for each object, Unity sets up the shaders and textures and starts feeding the GPU with the vertices, triangles, normals and other attributes associated to the vertices. The actual rendering is done by the GPU, where the shader calculates the coordinates of each visible triangle on the screen (vertex section) and paints the triangle according to the textures and lighting (fragment section). This process is repeated every frame for each active camera, and then the resulting buffer (where stuff actually is rendered) is finally transferred to the screen (kind of: some cameras may render to other buffers in order to create effects like reflections, ambient lighting, post processing etc.)
Answer by tanoshimi · Jul 01, 2017 at 01:40 PM
Both/Either. You can create meshes in code on the CPU, or in a geometry shader on the GPU. You can batch instances on the CPU, or using instancing on the GPU. You can perform calculations on the CPU or in a compute shader on the GPU....
Your answer
Follow this Question
Related Questions
How do I use UNetWeaver.dll during runtime? 0 Answers
How to make sure than one script affect the player of the specific client, and not the other 2 Answers
Getting a mix of warnings in multiplayer 0 Answers
Can I run unity with this system? 3 Answers
Rpc logic with bools, using tutorial scripts, can't find the flaw 1 Answer