mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Updated code changes to reflect content updates.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#version 330 core
|
||||
out vec4 fragColor;
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 ourColor;
|
||||
in vec2 texCoord;
|
||||
in vec2 TexCoord;
|
||||
|
||||
uniform float mixValue;
|
||||
|
||||
@@ -13,5 +13,5 @@ uniform sampler2D texture2;
|
||||
void main()
|
||||
{
|
||||
// linearly interpolate between both textures
|
||||
fragColor = mix(texture(texture1, texCoord), texture(texture2, texCoord), mixValue);
|
||||
FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), mixValue);
|
||||
}
|
||||
@@ -4,11 +4,11 @@ layout (location = 1) in vec3 aColor;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
|
||||
out vec3 ourColor;
|
||||
out vec2 texCoord;
|
||||
out vec2 TexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(aPos, 1.0f);
|
||||
gl_Position = vec4(aPos, 1.0);
|
||||
ourColor = aColor;
|
||||
texCoord = vec2(aTexCoord.x, aTexCoord.y);
|
||||
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
|
||||
}
|
||||
@@ -11,8 +11,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height);
|
||||
void processInput(GLFWwindow *window);
|
||||
|
||||
// settings
|
||||
const unsigned int SCR_WIDTH = 1280;
|
||||
const unsigned int SCR_HEIGHT = 720;
|
||||
const unsigned int SCR_WIDTH = 800;
|
||||
const unsigned int SCR_HEIGHT = 600;
|
||||
|
||||
// stores how much we're seeing of either texture
|
||||
float mixValue = 0.2f;
|
||||
|
||||
Reference in New Issue
Block a user