Changeset e5d4aca in opengl-game for shaders/overlay.vert
- Timestamp:
- Aug 22, 2019, 2:19:56 AM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 6544020
- Parents:
- c8c6da8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/overlay.vert
rc8c6da8 re5d4aca 1 1 #version 450 2 2 #extension GL_ARB_separate_shader_objects : enable 3 4 layout (binding = 0) uniform UniformBufferObject {5 mat4 model;6 mat4 view;7 mat4 proj;8 } ubo;9 3 10 4 layout(location = 0) in vec3 inPosition; … … 17 11 18 12 void main() { 19 if (gl_VertexIndex < 8) { 20 gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0); 13 if (gl_VertexIndex < 0) { 21 14 fragColor = inColor; 22 15 isOverlay = 0; 23 16 } else { 24 gl_Position = vec4(inPosition, 1.0); 25 fragColor = vec3(1.0, 1.0, 1.0); 17 fragColor = inColor; 26 18 isOverlay = 1; 27 19 } 28 20 29 21 fragTexCoord = inTexCoord; 22 gl_Position = vec4(inPosition, 1.0); 30 23 }
Note:
See TracChangeset
for help on using the changeset viewer.