engineer-thesis-WUT/learnOpenGl/engine/Shaders/fragmentShaderTextureUniform.fs

18 lines
391 B
Forth
Raw Normal View History

2023-03-19 17:50:43 +01:00
#version 330 core
out vec4 FragColor;
in vec3 ourColor;
in vec2 TexCoord;
// texture samplers
uniform sampler2D texture1;
uniform sampler2D texture2;
2023-03-29 14:46:58 +02:00
uniform float mixProportions; // set in OGL code
2023-03-19 17:50:43 +01:00
void main()
{
// linearly interpolate between both textures (80% container, 20% awesomeface)
FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), mixProportions);
}