Changeset fba08f2 in opengl-game for shaders/shader.frag


Ignore:
Timestamp:
Aug 2, 2019, 4:15:02 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
4f63fa8
Parents:
621664a
git-author:
Dmitry Portnoy <dmp1488@…> (08/02/19 04:01:00)
git-committer:
Dmitry Portnoy <dmp1488@…> (08/02/19 04:15:02)
Message:

Update vulkan-game.cpp to support texturing in the shader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shaders/shader.frag

    r621664a rfba08f2  
    22#extension GL_ARB_separate_shader_objects : enable
    33
     4layout(binding = 1) uniform sampler2D texSampler;
     5
    46layout(location = 0) in vec3 fragColor;
     7layout(location = 1) in vec2 fragTexCoord;
    58
    69layout(location = 0) out vec4 outColor;
    710
    811void main() {
    9     outColor = vec4(fragColor, 1.0);
     12   // outColor = vec4(fragColor, 1.0);
     13   // outColor = texture(texSampler, fragTexCoord);
     14   outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0);
    1015}
Note: See TracChangeset for help on using the changeset viewer.