Changeset a00eb06 in opengl-game for shaders/model.frag


Ignore:
Timestamp:
Apr 10, 2021, 12:58:17 AM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
8d92284
Parents:
914bb99
git-author:
Dmitry Portnoy <dportnoy@…> (04/10/21 00:49:42)
git-committer:
Dmitry Portnoy <dportnoy@…> (04/10/21 00:58:17)
Message:

In VulkanGame, add a normal varying attribute to ModelVertex

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shaders/model.frag

    r914bb99 ra00eb06  
    66layout(location = 0) in vec3 fragColor;
    77layout(location = 1) in vec2 fragTexCoord;
     8layout(location = 2) in vec3 normal_eye;
    89
    910layout(location = 0) out vec4 outColor;
    1011
    1112void main() {
    12    outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0);
     13   outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0) + vec4(normal_eye, 0.0) - vec4(normal_eye, 0.0);
    1314}
Note: See TracChangeset for help on using the changeset viewer.