Join us on Discord!
You can help CodeWalrus stay online by donating here.

FBO Particle System

Started by Snektron, January 22, 2015, 10:31:58 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Dream of Omnimaga

Do you plan to expand this further or even use the engine in a game, by the way?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Snektron

I was actually thinking of making some things like emitters, attractors, black holes etc. But ill have to see :p
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Maybe miotatsu could use it for magic spells in Piworld :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Snektron

You forget that PiWorld is in C and my particle system in Java :P. Though it shouldnt be too hard to port it :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Oh right, I forgot about that. How does it run so fast though? O.O (seeing how laggy Minecraft could get back then)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Snektron

That's because it uses the GPU to handle updates :P.
The only thing java does is some shader code and the update loop. Basically the position and velocity are stored in 2 textures. Then i use a technique called render to texture which updates the pos and vel tex. Then the pos yex is rendered to the screen. :P (ill explain a bit more later, dont have time atm)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Oh right, I always forget about the GPU. :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Duke "Tape" Eiyeron

It's funny how this *simple* program made me rethink about my general knowledge on the computer programing model. USing GPUs as anything other than 1337 games rendering became quite useful and we should now take them in account when developing heavy programs. I'm not saying anything not obvious but heck, tell the guys which made the GeForce 256 that one day we could use their future GPUs for processing medical samples, rendering epic GFX for movies or just process a frigging lot of data not related to polygon sorting!
  • Calculators owned: A lot.

Snektron

Quote from: Eiyeron on February 23, 2015, 05:07:29 PM
rendering epic GFX for movies

You think they are not used for that? Even blender has a build in mode which renders using the GPU :). Also, the amount of data they can proccess makes them excellent for btc mining. Oh and using the gpu for things like you suggested is called GPGPU, you might want to read up upon that :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Duke "Tape" Eiyeron

Quote from: Cumred_Snektron on February 23, 2015, 06:00:45 PM
Quote from: Eiyeron on February 23, 2015, 05:07:29 PM
rendering epic GFX for movies

You think they are not used for that? Even blender has a build in mode which renders using the GPU :). Also, the amount of data they can proccess makes them excellent for btc mining. Oh and using the gpu for things like you suggested is called GPGPU, you might want to read up upon that :)

I was specefically talking about such uses of the GPUs. (-_(//));
  • Calculators owned: A lot.

Dream of Omnimaga

Then there are also 4K demos. Those look really impressive considering they fit under 4 KB of code. I wonder if they would run on older computers or if they just use slower code shortcuts in order to keep size to a minimum? On calcs, some people will optimize for size and it will slow the game down, but at one point you can't really optimize for size anymore because it will get so slow on such older CPU/lack of GPU that the game will become unplayable. But on higher end computers even the sky isn't the limit. :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Snektron

With a bit of dirty code i can prop this all in one class file under 4K too. But modern GPU's have enough vram for quite a lot of data (except for the crappy 2mb integrated ones).
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

But I remember that many games before that required a 32 MB GPU would often not run on my 64 or 96 MB integrated Intel GPU. Sometimes they also require pixel shader support or various other things. Does your particle system require such dependencies or others?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Snektron

Well, yeah, but i've implemented a check in my partile system to see if the GPU has the needed features (Shader support, FBO support, OpenGL >= 3.0). Also it needs at least texsize*texsize*2*4*2*2 + texsize*texsize*4*4 bytes of vram (4 4-component 16-bit textures for pos and vel (2 for reading 2 for writing),  and a 4-component (vec4) 32 bit float point cloud with the same amount of vertices as the number of pixels in the pos texture).











texsizevram needed
51212.6 MB
102450.3 MB
1536113.24 MB
2048201.3 MB
2560314.6 MB
3072453.0 MB
3584616.6 MB
4096805.3 MB
And that doesn't include the Shader's size :P
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Duke "Tape" Eiyeron

  • Calculators owned: A lot.

Powered by EzPortal