Skip to content

Commit

Permalink
Basic random mesh selector function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravbug committed Jun 23, 2024
1 parent 7cad458 commit 0c91862
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RavEngine
9 changes: 9 additions & 0 deletions Samples/Rendering/shaders/AsteroidMeshSelection.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "utility.glsl"
#include "AsteroidShared.glsl"

uint choose_mesh(in ParticleData data, uint particleID){

uint ID = uint(round(rand(vec2(particleID,particleID)) * 3));

return ID;
}
5 changes: 5 additions & 0 deletions Samples/Rendering/shaders/AsteroidMeshSelection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"shader": "AsteroidMeshSelection.csh",
"type": "mesh-particle-selection",
"stage" : "compute"
}

0 comments on commit 0c91862

Please sign in to comment.