Changeset dc19a39 in opengl-game for explosion.vert
- Timestamp:
- Apr 26, 2019, 4:20:37 PM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 7e10667
- Parents:
- f97e638
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
explosion.vert
rf97e638 rdc19a39 4 4 5 5 uniform mat4 view, proj; 6 uniform mat4 model_mat;7 6 layout (std140) uniform models { 8 7 mat4 model_mats[MAX_NUM_OBJECTS]; … … 14 13 layout (location = 0) in vec3 v_i; // initial velocity 15 14 layout (location = 1) in float start_time; 16 //layout(location = 2) in uint ubo_index;15 layout(location = 2) in uint ubo_index; 17 16 18 17 out float opacity; … … 40 39 p += normalize(v_i) * mod(t, duration) / duration * 0.3; // allow time to loop around so particle emitter keeps going 41 40 42 //gl_Position = proj * view * model_mats[ubo_index] * vec4(p, 1.0); 43 gl_Position = proj * view * model_mats[0] * vec4(p, 1.0); 41 gl_Position = proj * view * model_mats[ubo_index] * vec4(p, 1.0); 44 42 gl_PointSize = 15.0; // size in pixels 45 43 }
Note:
See TracChangeset
for help on using the changeset viewer.