That takes me back. For a university course, I implemented some particle systems, not with compute shaders, but with Transform Feedback. A vertex shader moves the particle positions and updates their lifetime timers, a geometry shader deletes expired particles. And another geometry shader specifically for detecting collisions between the particle cloud and a given sphere.
nice, but just a reminder, the grid hashing is just an array with the index being some rounded positions, like worldGrid[x][y] (in 1d grid is something like this worldGrid[ x + y * size]), so you just enter all objects/references/pointers in each cell by its position, the performance improvement with something that simple is insane even when using lower dimensions like a 2d grid for a 3d game.
you need to restart slow, I know you have been working hard at some point but you are not there rn, so tomorrow just set as a goal do to very little, just the simplest thing, and work your way up from there back. Imagine you are a beginner again. I know this doesn't sound nice but it's the way to fix burnout 💪 Also try switching to other projects for some small time
I am currently wrting my own game engine. I am currently writing the update loop. But I am not sure how to do this. I am currently implementing a system similiar to Unity with Gameobjects and Components, but not sure what is the best way. Do you have any tips there?
You can use the entity system where you change the engines code to make new games or a scene system like unity, there should be documentation on them in the internet
I think it is best to not do it like unity, and not use ecs or stuff, just think of your own ways to solve the things there and you will come up with something good, also check this video out ruclips.net/video/id_xWalGulU/видео.html
Cuda kernels are closer to OpenCL / SYCL kernels. Both compute shaders and OpenCL kernels can be used for pretty much the same things. Difference is compute shaders are in GLSL... GLSL interpret OpenGL data structures directly, so communication between compute and rendering pipelines is much simpler. OpenCL and CUDA are better suited to actual compute, but converting between compute and rendering is a pain. CUDA is easier to integrate into a rendering pipeline, but you get vendor locked in. CUDA is available on Nvidia only. For games, slicing all low tier hadware (integrated GPU are only Intel or AMD) and part of the high end tier (AMD is competitive in most titles) is not really a good option. So TLDR: - CUDA is vendor locked. Not a good option for games. Very good option for platform specific applications - OpenCL / SYCL does not interop well with rendering pipelines. Not a good option for graphical visualization. It's a very good option for all other kind of application... Just less user friendly than CUDA. So it's market share in GPU computing is rather low as most us case can accept being vendor locked. - OpenGL compute shaders are easy to intgrate into a OpenGL pipeline. Pretty much best for a OpenGL game. And most other rendering API offers compute shaders in some way.
I don't think I will do this soon, check this videos tho, I think the tutorial here is already very good ruclips.net/p/PLRwVmtr-pp06qT6ckboaOhnm9FxmzHpbY
"why making my algorithm better, when i can make it run on 1948461594985 cuda cores"
- Tsun Zu, Art of Programming
fr 😂💪😎
I think that's a quote from his lesser known disciple Shi Tsu.
Now make a simulation of the observable universe :P
should be easy enough 😎
That takes me back. For a university course, I implemented some particle systems, not with compute shaders, but with Transform Feedback. A vertex shader moves the particle positions and updates their lifetime timers, a geometry shader deletes expired particles. And another geometry shader specifically for detecting collisions between the particle cloud and a given sphere.
Yes!! RUclips gave me handsome man doing cool gpu stuff I don't understand lets go!!
lets gooo 💪😎
nice, but just a reminder, the grid hashing is just an array with the index being some rounded positions, like worldGrid[x][y] (in 1d grid is something like this worldGrid[ x + y * size]), so you just enter all objects/references/pointers in each cell by its position, the performance improvement with something that simple is insane even when using lower dimensions like a 2d grid for a 3d game.
where did you learn this? your brain is massive. keep up the work!
0:25 I thought you were going to say "So instead I'm gonna buy a better laptop" :))
that would also be a good idea 😂😂, less work for me
2:08 YUPPIE YUPPIE YUPPIE YUPPIE YUPPIE YUPPIE YUPPIE YUPPIE YUPPIE
How do I deal with burnout? I've been working on my first game but in the last couple days I can't really start.
you need to restart slow, I know you have been working hard at some point but you are not there rn, so tomorrow just set as a goal do to very little, just the simplest thing, and work your way up from there back. Imagine you are a beginner again. I know this doesn't sound nice but it's the way to fix burnout 💪 Also try switching to other projects for some small time
I am currently wrting my own game engine. I am currently writing the update loop. But I am not sure how to do this. I am currently implementing a system similiar to Unity with Gameobjects and Components, but not sure what is the best way. Do you have any tips there?
You can use the entity system where you change the engines code to make new games or a scene system like unity, there should be documentation on them in the internet
I think it is best to not do it like unity, and not use ecs or stuff, just think of your own ways to solve the things there and you will come up with something good, also check this video out
ruclips.net/video/id_xWalGulU/видео.html
@@lowlevelgamedev9330 Thank you
Super
is it possible to do the same gpu operations on sdl2
yess, you need however to get hold of the opengl context
Heard abour CUDA? does it serve the same purpose as opengl compute shaders? and what are the pros and cons?
Cuda kernels are closer to OpenCL / SYCL kernels. Both compute shaders and OpenCL kernels can be used for pretty much the same things. Difference is compute shaders are in GLSL... GLSL interpret OpenGL data structures directly, so communication between compute and rendering pipelines is much simpler. OpenCL and CUDA are better suited to actual compute, but converting between compute and rendering is a pain. CUDA is easier to integrate into a rendering pipeline, but you get vendor locked in. CUDA is available on Nvidia only. For games, slicing all low tier hadware (integrated GPU are only Intel or AMD) and part of the high end tier (AMD is competitive in most titles) is not really a good option.
So TLDR:
- CUDA is vendor locked. Not a good option for games. Very good option for platform specific applications
- OpenCL / SYCL does not interop well with rendering pipelines. Not a good option for graphical visualization. It's a very good option for all other kind of application... Just less user friendly than CUDA. So it's market share in GPU computing is rather low as most us case can accept being vendor locked.
- OpenGL compute shaders are easy to intgrate into a OpenGL pipeline. Pretty much best for a OpenGL game. And most other rendering API offers compute shaders in some way.
i love your videos
GPU???? How did you spread it on different Cores? (Or maybe you didn't ...)
you can specify how many threads you want and each thread is like on a core
Just use GJK for collision bro
Now make a noita clone
Please Create 3D camera Video
Position,
Depth,
View matrix,
Projection matrix
A good tutorial. Only on camera
I don't think I will do this soon, check this videos tho, I think the tutorial here is already very good
ruclips.net/p/PLRwVmtr-pp06qT6ckboaOhnm9FxmzHpbY
@@lowlevelgamedev9330 learnopengl