Changeset f00ee54 in opengl-game for shaders/scene.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/scene.frag

    rd53ef6a rf00ee54  
    33
    44layout(binding = 1) uniform sampler2D texSampler;
    5 layout(binding = 2) uniform sampler2D uiTexSampler;
    65
    76layout(location = 0) in vec3 fragColor;
    87layout(location = 1) in vec2 fragTexCoord;
    9 layout(location = 2) flat in uint isOverlay;
    108
    119layout(location = 0) out vec4 outColor;
    1210
    1311void main() {
    14    if (isOverlay == 1) {
    15       outColor = texture(uiTexSampler, fragTexCoord);
    16    } else {
    17       outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0);
    18    }
     12   outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0);
    1913}
Note: See TracChangeset for help on using the changeset viewer.