Changeset 845a2cb in opengl-game for gl-shaders
- Timestamp:
- Apr 22, 2020, 12:58:07 AM (5 years ago)
- Branches:
- points-test
- Parents:
- 73a10ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gl-shaders/explosion.vert
r73a10ca r845a2cb 19 19 20 20 void main() { 21 /* 21 22 float duration = 0.5; 22 23 float t = cur_time - explosion_start_time[ubo_index] - start_time; … … 36 37 } 37 38 38 vec3 p = vec3(0.0, 0.0, 0.0);// this is the center of the explosion39 vec3 a = vec3(0.0, 0.1, 0.0);40 p += normalize(v_i) * mod(t, duration) / duration * 0.3; // allow time to loop around so particle emitter keeps going39 // this is the center of the explosion 40 // allow time to loop around so particle emitter keeps going 41 vec3 p = normalize(v_i) * mod(t, duration) / duration * 0.3; 41 42 42 43 gl_Position = proj * view * model_mats[ubo_index] * vec4(p, 1.0); 43 gl_PointSize = 15.0; // size in pixels 44 */ 45 opacity = 1.0; 46 gl_Position = vec4(0.0, 0.0, 0.0, 1.0); 47 gl_PointSize = 100.0; // size in pixels 44 48 }
Note:
See TracChangeset
for help on using the changeset viewer.