Page 2 of 2

Re: Change FB resolution without resetting

Posted: Sat Aug 20, 2016 7:34 am
by robmar
Its slow maybe because its rendering 4 million primitives each frame, with pixel lighting and soft shadows.

Re: Change FB resolution without resetting

Posted: Sun Aug 21, 2016 5:44 am
by Cube_
that sounds like it could be optimized pretty easily (4M is almost always possible to reduce drastically)

Re: Change FB resolution without resetting

Posted: Sun Aug 21, 2016 8:52 am
by robmar
Its already fully optimised to the point quality is lost... and the meshes are all up in the GPU for rendering.

Re: Change FB resolution without resetting

Posted: Sun Aug 21, 2016 6:34 pm
by Cube_
oh well, then back to my initial recommendation - profile the code, see what takes a long time (if I'd wager a guess: soft shadows or transparency) and see if it can be made faster.

4M tris in itself isn't necessarily a bad thing, I push significantly more on my rather ancient HD5770 so blech.

Re: Change FB resolution without resetting

Posted: Mon Aug 22, 2016 8:16 am
by robmar
What takes time is for the GPU to do the rendering of 4 or 5 million primitives!

I don't think its a problem in the code, simply the volume of primitives for the GPU to handle, and run the pixel shader.

Its also not my pixel shader, as if I select the default renderer, its not much faster.

The shadow map takes almost as long to render as the scene, which is to be expected as its usually a similar number of visible primitives.

The delay is in the render call of the GPU-preloaded mesh.

Have you ever tried to render 4 million primitives and seen that the GPU takes time to do that?

Render a model/s with 4 million primitives with your code and tell me what frame rate you get, and on what CPU/GPU!