Changeset f00ee54 in opengl-game for shaders/scene.frag
- Timestamp:
- Aug 25, 2019, 12:58:06 AM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 721e8be
- Parents:
- d53ef6a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/scene.frag
rd53ef6a rf00ee54 3 3 4 4 layout(binding = 1) uniform sampler2D texSampler; 5 layout(binding = 2) uniform sampler2D uiTexSampler;6 5 7 6 layout(location = 0) in vec3 fragColor; 8 7 layout(location = 1) in vec2 fragTexCoord; 9 layout(location = 2) flat in uint isOverlay;10 8 11 9 layout(location = 0) out vec4 outColor; 12 10 13 11 void 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); 19 13 }
Note:
See TracChangeset
for help on using the changeset viewer.