daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -1,10 +1,17 @@
|
||||
#version 330 core
|
||||
in vec4 vertexColor;
|
||||
|
||||
in vec3 TexColor;
|
||||
in vec2 TexCoord;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform sampler2D ourTexture;
|
||||
uniform sampler2D ourTexture2;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vertexColor;
|
||||
vec4 tex1 = texture(ourTexture, TexCoord);
|
||||
vec4 tex2 = texture(ourTexture2,TexCoord);
|
||||
FragColor = mix(tex1,tex2,0.2) /**/ *vec4( TexColor,1.0) /**/;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
#version 330 core
|
||||
layout(location=0)in vec3 aPos;
|
||||
|
||||
out vec4 vertexColor;
|
||||
layout(location = 0) in vec3 aPos;
|
||||
layout(location = 1) in vec3 aColor;
|
||||
layout(location = 2) in vec2 aTextCoord;
|
||||
|
||||
out vec3 TexColor;
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform vec3 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position=vec4(aPos.xyz,1.0);
|
||||
vertexColor = vec4(0.1,0.003,0.665,1.0);
|
||||
gl_Position = vec4(aPos.xyz,1.0);
|
||||
TexColor = color;
|
||||
TexCoord = aTextCoord;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user