feature/imgui-sdl
Last change
on this file since 9d21aac was 6d95ade, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 5 years ago |
In OpenGLRef, stop passing position_eye from the laser vertex shader to the fragment shader since the fragment shader never uses it
|
-
Property mode
set to
100644
|
File size:
474 bytes
|
Line | |
---|
1 | #version 410
|
---|
2 |
|
---|
3 | #define MAX_NUM_OBJECTS 1024
|
---|
4 |
|
---|
5 | uniform mat4 view, proj;
|
---|
6 |
|
---|
7 | layout (std140) uniform models {
|
---|
8 | mat4 model_mats[MAX_NUM_OBJECTS];
|
---|
9 | };
|
---|
10 |
|
---|
11 | layout(location = 0) in vec3 vertex_position;
|
---|
12 | layout(location = 1) in vec2 vt;
|
---|
13 | layout(location = 2) in uint ubo_index;
|
---|
14 |
|
---|
15 | out vec2 texture_coordinates;
|
---|
16 |
|
---|
17 | void main() {
|
---|
18 | vec3 position_eye = vec3(view * model_mats[ubo_index] * vec4(vertex_position, 1.0));
|
---|
19 |
|
---|
20 | texture_coordinates = vt;
|
---|
21 |
|
---|
22 | gl_Position = proj * vec4(position_eye, 1.0);
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.