mojira.dev

Cyphall

Assigned

No issues.

Reported

MCPE-2275 Bug with the hit box of stairs corners Cannot Reproduce

Comments

Still present in 1.19-pre1

Also happening on GTX 1070 (v445.87)

Affects release 1.15.2

So I went a bit deeper and used the Frame Profiler from Nvidia Nsight Graphics to hopefully find the cause of the FPS decrease when the world is already loaded and I found some interesting stuff.

1.14:

[media]

1.15:

[media]

First, in 1.15, there is a new OpenGL function used : glEnableClientState. This function is used 19191 times, which represents about a third of all the OpenGL calls.
Even tho it is used a lot, it only represents 1.24ms on CPU, which is not much compared to the total amount of time used to render a whole frame, so this is probably not the cause of the problem.

Second, the number of draw calls is pertty much the same between the two versions, with 3527 for 1.14 and 3841 for 1.15.
The difference could be caused by 1.14 not loading the farthest chunks, as I was using a render distance of 24 chunks (even tho I tried my best to load them all, waiting for the "chunks updates" in F3 menu to be 0 permanently and in all directions).
However, this small difference alone can't explains such a loss of FPS.

But the story doesn't end here. What I've found is that the 3841 draw calls in 1.15 takes 14.38ms on CPU and 3.52ms on GPU, where the 3527 draw calls in 1.14 only takes 9.43ms on CPU and 2.62ms on GPU. This means each draw call takes about 1.5* more time in 1.15 than in 1.14.
This difference can be explained by a potential switch from rendering blocks faces with quads to rendering them with triangles (which is the preferred way for maximum driver compatibility), a quad having only 4 vertices while 2 triangles (to represents the quad) having a total of 6 vertices.
In fact, this is probably what causes the FPS decrease.
Also, what we can see is that the rendering is heavily CPU botlenecked (draw calls taking much more CPU time than GPU time).

 

In my opinion, the solution could be to batch draw calls together to reduce their number and thus CPU time used for them. (I may be totally wrong as I haven't used batching myself yet, so I don't know exactly how this works)

I just found that when I'm at 32 chunks render distance with the world fully loaded, when looking at the horizon, I have 30-40 fps, but when looking at my foots, I'm back to 400+ fps.

This clearly shows the problem comes from something happening in the camera frustum (like rendering or maybe chunk updates) and apparently not from chunk loading, as initially explained by sliced_lime.

Same thing for me.

With a fully loaded world at a render distance of 32 chunks, with the exact same settings (including position and rotation), 1.14.4 gives me 115 to 120 fps and with 1.15 pre 1, I only get 60 to 65 (with down to 30 when looking in other directions).

The good point is that chunk loading seems to be faster at higher render distances.

 

Ryzen 7 2700x

GTX 1070

16 Go RAM

Same problem here.

The game crashed whilst rendering overlay
Error: due: Unable to fit: minecraft:block/magenta_stained_glass - size: 1024x1024 - Maybe try a lower resolution resourcepack?

Note that loading a 1024x or even 2048x resources pack was working in 1.12.2 (even though 2048x was very buggy).