Changeset 4ece3bf in opengl-game for shaders


Ignore:
Timestamp:
Jan 21, 2020, 6:14:09 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
5a1ace0
Parents:
3e8cc8b
Message:

In VulkanGame, add the ability to delete asteroids and move them at a constant speed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shaders/asteroid.vert

    r3e8cc8b r4ece3bf  
    55   mat4 model;
    66   float hp;
     7   bool deleted;
    78};
    89
     
    4243  light2_position_eye = vec3(ubo.view * vec4(light2_position_world, 1.0));
    4344
    44   gl_Position = ubo.proj * vec4(position_eye, 1.0);
     45  if (sbo.objects[obj_index].deleted) {
     46     gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
     47  } else {
     48    gl_Position = ubo.proj * vec4(position_eye, 1.0);
     49  }
    4550}
Note: See TracChangeset for help on using the changeset viewer.