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


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/overlay.frag

    rd53ef6a rf00ee54  
    44layout(binding = 0) uniform sampler2D uiTexSampler;
    55
    6 layout(location = 0) in vec3 fragColor;
    7 layout(location = 1) in vec2 fragTexCoord;
    8 layout(location = 2) flat in uint isOverlay;
     6layout(location = 0) in vec2 fragTexCoord;
    97
    108layout(location = 0) out vec4 outColor;
     
    1210void main() {
    1311   outColor = texture(uiTexSampler, fragTexCoord);
    14 
    15    if (isOverlay == 1) {
    16       outColor = texture(uiTexSampler, fragTexCoord);
    17    } else {
    18       outColor = vec4(fragColor * texture(uiTexSampler, fragTexCoord).rgb, 1.0);
    19    }
    2012}
Note: See TracChangeset for help on using the changeset viewer.