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


Ignore:
Timestamp:
Aug 25, 2019, 12:58:06 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
721e8be
Parents:
d53ef6a
Message:

Refactor the code to allow different graphics pipelines to use different Vertex structs and different uniform and vertex attributes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shaders/overlay.vert

    rd53ef6a rf00ee54  
    33
    44layout(location = 0) in vec3 inPosition;
    5 layout(location = 1) in vec3 inColor;
    6 layout(location = 2) in vec2 inTexCoord;
     5layout(location = 1) in vec2 inTexCoord;
    76
    8 layout(location = 0) out vec3 fragColor;
    9 layout(location = 1) out vec2 fragTexCoord;
    10 layout(location = 2) out uint isOverlay;
     7layout(location = 0) out vec2 fragTexCoord;
    118
    129void main() {
    13    if (gl_VertexIndex < 0) {
    14       fragColor = inColor;
    15       isOverlay = 0;
    16    } else {
    17       fragColor = inColor;
    18       isOverlay = 1;
    19    }
     10   fragTexCoord = inTexCoord;
    2011
    21    fragTexCoord = inTexCoord;
    2212   gl_Position = vec4(inPosition, 1.0);
    2313}
Note: See TracChangeset for help on using the changeset viewer.