Changeset fe5e3ca in opengl-game for explosion.vert
- Timestamp:
- Jan 11, 2019, 4:10:11 PM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 646f3f2, c5fb958
- Parents:
- 8fbd34f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
explosion.vert
r8fbd34f rfe5e3ca 1 1 #version 410 core 2 2 3 // TODO: Pass the explosion center in as a uniform 3 #define MAX_NUM_OBJECTS 1024 4 5 uniform mat4 view, proj; 6 uniform mat4 model_mat; 7 8 /* 9 layout (std140) uniform models { 10 mat4 model_mats[MAX_NUM_OBJECTS]; 11 }; 12 */ 4 13 5 14 uniform float explosion_start_time; … … 8 17 layout (location = 0) in vec3 v_i; // initial velocity 9 18 layout (location = 1) in float start_time; 19 //layout(location = 2) in uint ubo_index; 10 20 11 21 out float opacity; … … 33 43 p += normalize(v_i) * mod(t, duration) / duration * 0.3; // allow time to loop around so particle emitter keeps going 34 44 35 gl_Position = vec4(p, 1.0); 45 //gl_Position = proj * view * model_mats[0] * vec4(p, 1.0); 46 gl_Position = proj * view * model_mat * vec4(p, 1.0); 36 47 gl_PointSize = 15.0; // size in pixels 37 48 }
Note:
See TracChangeset
for help on using the changeset viewer.