Changeset 69dccfe in opengl-game for shaders/shader.frag
- Timestamp:
- Aug 6, 2019, 7:01:45 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 5f3dba8
- Parents:
- bba12e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/shader.frag
rbba12e7 r69dccfe 3 3 4 4 layout(binding = 1) uniform sampler2D texSampler; 5 layout(binding = 2) uniform sampler2D uiTexSampler; 5 6 6 7 layout(location = 0) in vec3 fragColor; 7 8 layout(location = 1) in vec2 fragTexCoord; 9 layout(location = 2) flat in uint isOverlay; 8 10 9 11 layout(location = 0) out vec4 outColor; 10 12 11 13 void main() { 12 outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0); 14 if (isOverlay == 1) { 15 outColor = vec4(fragColor * texture(uiTexSampler, fragTexCoord).rgb, 0.3); 16 } else { 17 outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0); 18 } 13 19 }
Note:
See TracChangeset
for help on using the changeset viewer.