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


Ignore:
Timestamp:
Aug 25, 2019, 12:58:06 AM (6 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/scene.vert

    rd53ef6a rf00ee54  
    1414layout(location = 0) out vec3 fragColor;
    1515layout(location = 1) out vec2 fragTexCoord;
    16 layout(location = 2) out uint isOverlay;
    1716
    1817void main() {
    19    if (gl_VertexIndex < 8) {
    20       gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
    21       fragColor = inColor;
    22       isOverlay = 0;
    23    } else {
    24       gl_Position = vec4(inPosition, 1.0);
    25       fragColor = vec3(1.0, 1.0, 1.0);
    26       isOverlay = 1;
    27    }
     18   fragColor = inColor;
     19   fragTexCoord = inTexCoord;
    2820
    29    fragTexCoord = inTexCoord;
     21   gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
    3022}
Note: See TracChangeset for help on using the changeset viewer.