Changeset e5d4aca in opengl-game for shaders/overlay.vert


Ignore:
Timestamp:
Aug 22, 2019, 2:19:56 AM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
6544020
Parents:
c8c6da8
Message:

Create separate descriptor pools and descriptor sets for each shader group and start removing unnecessary elements from the overlay shaders

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shaders/overlay.vert

    rc8c6da8 re5d4aca  
    11#version 450
    22#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;
    93
    104layout(location = 0) in vec3 inPosition;
     
    1711
    1812void main() {
    19    if (gl_VertexIndex < 8) {
    20       gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
     13   if (gl_VertexIndex < 0) {
    2114      fragColor = inColor;
    2215      isOverlay = 0;
    2316   } else {
    24       gl_Position = vec4(inPosition, 1.0);
    25       fragColor = vec3(1.0, 1.0, 1.0);
     17      fragColor = inColor;
    2618      isOverlay = 1;
    2719   }
    2820
    2921   fragTexCoord = inTexCoord;
     22   gl_Position = vec4(inPosition, 1.0);
    3023}
Note: See TracChangeset for help on using the changeset viewer.