Very rough guesstimates: 200000 * 200 * 2 = 80M tris/sec 200000 * 200 * 32x32px = 40 gpix/sec (if no occlusion culling) Neither of those numbers are particularly huge for modern GPUs. I'd wager that a compute shader + mesh shader based version of this could hit 2M sprites at 200 fps, though at some point we'd have to argue about what counts as "cheating" - if I do a clustered occlusion query that results in my pipeli…
Bunnymark GL in Jai – 200k sprites at 200fps [video]
51–60 of 70 posts
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#52Very rough guesstimates: 200000 * 200 * 2 = 80M tris/sec 200000 * 200 * 32x32px = 40 gpix/sec (if no occlusion culling) Neither of those numbers are particularly huge for modern GPUs. I'd wager that a compute shader + mesh shader based version of this could hit 2M sprites at 200 fps, though at some point we'd have to argue about what counts as "cheating" - if I do a clustered occlusion query that results in my pipeli…
but yes, that's cheating, since it's impractical to work with
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#53Earlier quoted context omitted.
Rendering only one large triangle can be faster than two. First one triangle needs less memory, less vertex processing, etc. Second, modern GPUs render pixels in groups of 2x2 up to 8x8 "tiles". If only one pixel from this group is part of a triangle, the entire group will be rendered. When two triangles form a quad, the entire area along the diagonal "seam" will be rendered twice. The smaller quads you have, the mor…
I disagree, with the exception of the case you link to where half the pixels are outside the viewport or maybe where a sufficient percentage are outside the viewport. > When two triangles form a quad, the entire area along the diagonal "seam" will be rendered twice This may be true, but I'm pretty sure that this is more than made up for by the additional pixels in the single triangle circumscribing the quad. In fact,…
These "shadow" pixel shader invocations are a very real pain when it comes to rendering highly detailed models. The hardware rasterization pipeline can't cope well with huge amounts of really tiny triangles. That's the reason why UE5 Nanite uses a software GPU rasterizer for the high geometry density sections of a model - it's faster! Large area primitives will be rendered normally AFAIK.
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#54Earlier quoted context omitted.
it's a lot of fun! jai is my intro to systems programming. so i haven't tried this in C++ (actually i have tried a few times over the past few years but never successuflly). this is just a test of opengl, C++ should be the same exact performance considering my cpu usage is only 7% while gpu usage is 80%. but the process of writing it is infinitely better than C++, since i never got C++ to compile a hardware accelerat…
the official rendering modules are a bit all over the place atm... did you use Simp, Render, GL, or handle the rendering yourself?
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#55It's been awhile since I've done game engine work, but is this impressive? The first thing that comes to mind is they're using instanced rendering. This allows the CPU to only deal with 1 sprite, while telling the GPU to render multiple instances of the sprite, and use a GPU buffer to find each sprite's transformation matrix. All the CPU has to do is update that mmap'ed buffer with new position information (or do som…
you're not missing anything, it's not impressive. i was just checking how fast computers are and sharing the results. my original title was "an optimized 2d game engine can render 200k sprites at 200fps" but the mods changed it to match my youtube title (which made it a lot more popular). and the fact it's written in jai isn't relevant, it's just what i happened to use
I figured it wasn't given that you were showcasing a GL project. But nonethees disappointing as someone curious as to whether or not the language helped in indirect ways with how you structured your project and if you feel you could scale it up to something closer to production ready. That did seem to be the goal of Jai when I last looked into its development some 4 years ago.
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#56Earlier quoted context omitted.
you're not missing anything, it's not impressive. i was just checking how fast computers are and sharing the results. my original title was "an optimized 2d game engine can render 200k sprites at 200fps" but the mods changed it to match my youtube title (which made it a lot more popular). and the fact it's written in jai isn't relevant, it's just what i happened to use
> and the fact it's written in jai isn't relevant I figured it wasn't given that you were showcasing a GL project. But nonethees disappointing as someone curious as to whether or not the language helped in indirect ways with how you structured your project and if you feel you could scale it up to something closer to production ready. That did seem to be the goal of Jai when I last looked into its development some 4 y…
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#57Earlier quoted context omitted.
> We need more of this approach. 1000% agree. I recently took it upon myself to see just how far I can push modern hardware with some very tight constraints. I've been playing around with a 100% custom 3D rasterizer which purely operates on the CPU. For reasonable scenes ( single thread. On a 5950x, I was able to support over 10 clients simultaneously without any issues. The GPU in my workstation is just moving the f…
> One fun thing I discovered is just how low latency a pure CPU rasterizer can be compared to a full CPU-GPU pipeline i'm definitely going to have to test that! always trying to minimize input delay
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#58Earlier quoted context omitted.
I thought Jai wasn't released yet. Are you a beta user or did he release it already?
It isn't released. That said, from people I know, it seems like you can just ask nicely and show some interest and he'll let you try it out.
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#59Nice demo! We need more of this approach. You really can achieve amazing stuff with just plain e.g. OpenGL optimized for your rendering needs. With todays GPU acceleration capabilities we could have town-building games with huge map resolutions and millions of entities. Instead its mostly only used to make fancy graphics. Actually I am currently trying to build something like that [1]. A big big world with hundreds o…
> We need more of this approach. 1000% agree. I recently took it upon myself to see just how far I can push modern hardware with some very tight constraints. I've been playing around with a 100% custom 3D rasterizer which purely operates on the CPU. For reasonable scenes ( single thread. On a 5950x, I was able to support over 10 clients simultaneously without any issues. The GPU in my workstation is just moving the f…
Re: Bunnymark GL in Jai – 200k sprites at 200fps [video]
#60Very rough guesstimates: 200000 * 200 * 2 = 80M tris/sec 200000 * 200 * 32x32px = 40 gpix/sec (if no occlusion culling) Neither of those numbers are particularly huge for modern GPUs. I'd wager that a compute shader + mesh shader based version of this could hit 2M sprites at 200 fps, though at some point we'd have to argue about what counts as "cheating" - if I do a clustered occlusion query that results in my pipeli…