Just stubborn enough bro XDGood work man! You are a fucken god!
Just stubborn enough bro XDGood work man! You are a fucken god!
Just stubborn enough bro XD
Update. I made a mesh out of all vertices from map screen, and drew it with in a batch using the same amount of sprites as before. I got HUGE performance increase. Before it was like 50-70 fps, now it revolves around 140-170. But I have to figure few things. First I need to draw this mesh properly (as you can see tile are drawn completely wrong with this approach). The main problem is with a texture array. I cannot fill it with every sprite ( I was intending to make a huge atlas) , and give a shader address to a particular sprite I want to draw at a time. I guess I will give it a shot and I will make a new texture array with graphics I need before each draw. I guess CPU will handle it easily anyway. But guys... This triple fps increase is f**king overkill. I hope this is going to work as I intend it to I am so excited now XD
Update. I made a mesh out of all vertices from map screen, and drew it with in a batch using the same amount of sprites as before. I got HUGE performance increase. Before it was like 50-70 fps, now it revolves around 140-170. But I have to figure few things. First I need to draw this mesh properly (as you can see tile are drawn completely wrong with this approach). The main problem is with a texture array. I cannot fill it with every sprite ( I was intending to make a huge atlas) , and give a shader address to a particular sprite I want to draw at a time. I guess I will give it a shot and I will make a new texture array with graphics I need before each draw. I guess CPU will handle it easily anyway. But guys... This triple fps increase is f**king overkill. I hope this is going to work as I intend it to I am so excited now XD
I think upload everything you will use before each draw can make the fps better but no much. The gpu/cpu will loose time to render from the thingtype texture into the main texture which will lead to a lot of texture binds = less performance. Then on the drawing process you may get better fps because there will be only one texture bind to render all the scene. And why you can't fill the texture array with every texture being used in the game?
Thank you I guess I finnaly feel capable of contributing something usefull for Otclient and its communityAwesome progress Thanks for putting in all this work for the future of OT projects.
Its getting me pumped to start my new project..
Trying to upload the whole spr file to the texture array is insane LOL. Obviously it will be a waste of memory. But i think uploading every sprite that will be used to draw before actually drawing it may have better performance because of two things: As there is multiple objects in the scene there is too many texture binds and because there may be duplicated objects in the same scene we will save a lot of texture binds. I think cipsoft have solved this issue in flash client and new tibia 11 client with the depth buffer. They have removed the possibility of transparent sprites and then they draw objects in groups: they draw all objects with the same sprites to reduce texture binds. How? Using the dept buffer so they can set which sprite will be above the other, organizing the scene as we know it.Drawing it with a single upload enhanced the fps 3 times, roughly so that is the way to do it If it comes to texture arrays
I tried to make a use of x,y offsets (to make a page) and z offset to put those pages on diffrent layers. But to put entire sprites file we need like 8192*8192*6 * 4 of bytes to allocate all of them so its horrible wastefull. When I did that application crashed upon first draw call anyway, so I guess it simply couldn't send that much data through the pipeline to GPU or whatever. Nevertheless I have to somehow draw entire tile mesh with all items, but I still have to job to do in terms of my opengl education to make it properly
Trying to upload the whole spr file to the texture array is insane LOL.
@tarjei so did you build the big atlas with the needed sprites before each draw? Maybe some of the performance gain is caused by newer opengl(opengl 3)?
Amazing work Tarjei, that massive increase in FPS will go a long way to get the OT client more usable.
However, I have to say, that with OpenGL3, the graphics look a little bit fuzzy. It's really noticeable if you look at the flowers on the beach, or the seashells, or the barrel.
Unless there was something done differently when taking the screenshots, OpenGl3 is a bit fuzzy.