mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-12 03:23:22 +08:00
Complete code re-work 'Getting Started' tutorials.
This commit is contained in:
15
src/1.getting_started/4.2.textures_combined/4.2.texture.fs
Normal file
15
src/1.getting_started/4.2.textures_combined/4.2.texture.fs
Normal file
@@ -0,0 +1,15 @@
|
||||
#version 330 core
|
||||
out vec4 fragColor;
|
||||
|
||||
in vec3 ourColor;
|
||||
in vec2 texCoord;
|
||||
|
||||
// texture samplers
|
||||
uniform sampler2D texture1;
|
||||
uniform sampler2D texture2;
|
||||
|
||||
void main()
|
||||
{
|
||||
// linearly interpolate between both textures (80% container, 20% awesomeface)
|
||||
fragColor = mix(texture(texture1, texCoord), texture(texture2, texCoord), 0.2);
|
||||
}
|
||||
Reference in New Issue
Block a user