New answers tagged

2

Using more meshes with fewer polygons per mesh can improve performance when it allows the renderer to cull more objects. Culling refers to skipping objects during the render process, which improves performance. There are two main reasons why an object might get culled: View-frustum culling: Objects that are entirely outside the field of view of the camera ...


1

Lets say initiating a draw call takes 1 millisecond. Now lets say that it takes 10 milliseconds to draw 100 polygons. A single call to draw 100 polygons costs 11 milliseconds 11ms * 1000 = 11 seconds. For 100k polygons: 100,000 / 100 = 1000 * 10ms = 10 seconds. Add on the 1ms for initiating the draw call = 10.001 seconds. Drawing the 100k polygons once ...


4

There are two main components to the time it takes to process a draw call: The time it takes to calculate all the results for every work item in the batch The time it takes to upload info / switch states / ready the GPU to start working on it As GPUs have gotten more powerful, most of the leaps and bounds have helped with point 1. They can now run hundreds ...


0

10 seconds for 20 verts model is way too long. And it seems there's not much you can do to speedup this exact library. It constructs lots of temporary strings instead of referencing substrings within the file. It runs regular expressions to match the face data indices, and does it multiple times until matching structure found, with pos/norm/texco format ...


1

Yes, you can use both at the same time. Though, you can only have 2D physics interactions with the 2D physics engine. The models are separate from the logic of the physics engines, so your objects can even have 3D models but 2D physics. Your raycasts can be separate from the physics engine too. You can just turn the 2D rigidbodies on or off. That will ...


0

First of all, are you sure that the framerate of your game is affected by unnecessary physics calculations? Have you measured it using the Unity profiler? It's usually not worth the time to chase imagined performance problems when you have no profiler data to confirm that they actually matter and no profiler data to compare to in order to check if your ...


0

The reason it is checking 9 tiles is because it is also checking the middle tile. IT's funny, because I came up with the exact same solution. And you should be proud, as it's a fairly elegant one. anyway, the line that interests you is the if( ... !( rowOffset == 0 && colOffset === 0 )) this makes sure that you skip the "middle" tile. Heres a simple ...


Top 50 recent answers are included