Skip to main content
GameDev.net gamedev.net
🔒 Locked

New engine, new problem

Started by Kajos Jul 18, 2012 at 10:09 PM 4 replies 1.1k views
Original Post
Kajos
Kajos
I'm currently working on a new engine as a side project. It's very much a proof of concept, however the concept is almost proven smile.png

You can see some videos of it in action here:

http://www.youtube.c...d voxelrenderer

However when I have 64x64 quads, the GPU has trouble handling this. I use a very light (post,on framebuffer and one on each item) shaders, which I tried disabling to no avail, so I think it's just the quantity.

I think that 64x64 quads a modern GPU should be able to manage though, are there any tricks maybe to lighten the rendering? Other than just lowering the resolution?

EDIT: (Also I do not know if VBO's would help in this case, I presume not, but even if it would I can't use them because I need to calculate the angle about each frame)

I use GL_ALPHA on each item.

Would it help to disable the depthbuffer and to render everything synchronously (although this will be a pain to make)?
Kajos
Kajos
Disregard, it's the angle calculation which is too heavy I think.
Kajos
Kajos
Nope, I was wrong. I think it's the alphablending.. I wish there some magical GPU profiler
dpadam450
dpadam450
what does 64x64 quads mean? And what are you blending?
NBA2K, Madden, Maneater, Killing Floor, Sims 
21st Century Moose
21st Century Moose
64x64 quads is nothing - I can handle 1,000,000 boxes on relatively low-end laptop hardware.

Yes, a VBO will help a lot if you're using immediate mode. If you're calculating your angle changes on the CPU, consider specifying them as per-instance data and moving these calculations to your vertex shader instead. That way your VBO data will be able to remain static and with a smaller dynamic upload per-frame.
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 
Kajos
Kajos
That's a good idea, to move them to the vertex shaders. I might try that later on! For now, I fixed the problem by disabling my beautiful clouds. I still don't know exactly if the problem lies in my angel calculation (I tried rainbow tables to no avail so this would suggest not) or the transparency (I would think this would be fixed by disabling the depth buffer.. but it was not).

Edit: As one sees, I am a newb with OpenGL - why did i not think about using them vertex shaders sleep.png"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.