Answer the question
In order to leave comments, you need to log in
Why texture graphics in 2D?
The question began to torment me. I've been going through OpenGL for how long I don't remember, I need nothing at all. Know how to draw graphics in 2D. And everyone says as one: “Use shapes and apply textures to them.†And then the question arose. Isn’t it stupid to use shapes in 2D? But with 2D, I think it's the lot of masochists to make shapes every frame.Yes, yes, yes. Texture mapping is much more efficient than the method of drawing an array of pixels. Well, these are the questions that torment me, as I said in the first sentence
. is this in all engines? (In UE4 we just load a sprite)
Is it possible to make the overlay not as sloppy as it usually looks? (With all sorts of lines that make it look like a Lego character made)
And is it possible to do without overlay without losing precious graphics card performance?
Answer the question
In order to leave comments, you need to log in
But with 2D, I consider it the lot of masochists to make figures for every frame
In Unity, you can draw all the sprites you need from a texture in a single draw call. Provided of course that they are packed into one texture. Formally, this gives a significant increase in speed and resource savings for weak devices.
Using a figure to display a flat sprite just saves GPU resources, as it cuts off transparent pixels from loading into the GPU. A small percentage (max 30%) but there is.
The figure is not made every frame, in fact it is a flat 3D model, the triangles are inscribed in the shape.
What you are worried about is called "premature optimization", if the game is simple, then there is no need for such dense rendering. As well as there is no need to optimize for weak devices, unless you write for smart watches or weak controllers. Weak phones and tablets, and such games are designed specifically for them, have long been in the past, even a very weak device has an average speed of GPU communication with memory in the region of 0.5GByte / s, that is, it is theoretically capable of drawing 100MB of textures for 60 frames per second.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question