Changeset fd6f465 in opengl-game for laser.vert
- Timestamp:
- Jul 20, 2018, 1:42:00 AM (7 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 3effd81
- Parents:
- 9f9f9a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
laser.vert
r9f9f9a7 rfd6f465 1 1 #version 410 2 3 #define MAX_NUM_OBJECTS 1024 2 4 3 5 uniform mat4 view, proj; 4 6 7 layout (std140) uniform models { 8 mat4 model_mats[MAX_NUM_OBJECTS]; 9 }; 10 5 11 layout(location = 0) in vec3 vertex_position; 6 12 layout(location = 1) in vec2 vt; 13 layout(location = 2) in uint ubo_index; 7 14 8 15 out vec2 texture_coordinates; … … 10 17 11 18 void main() { 12 position_eye = vec3(view * vec4(vertex_position, 1.0));19 position_eye = vec3(view * model_mats[ubo_index] * vec4(vertex_position, 1.0)); 13 20 texture_coordinates = vt; 14 21
Note:
See TracChangeset
for help on using the changeset viewer.