Daily update 2 on 20240228 by nitload youmu
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#version 430 core
|
||||
|
||||
in vec3 texCoord;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(tex, texCoord.xy);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#version 430 core
|
||||
|
||||
layout(location = 0)in vec3 coord;
|
||||
layout(location = 1)in vec3 tCoord;
|
||||
|
||||
out vec3 texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(coord.xyz,1.0f);
|
||||
texCoord = tCoord;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -0,0 +1,13 @@
|
||||
#version 430 core
|
||||
|
||||
in vec3 texCoord;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(tex, texCoord.xy);
|
||||
//fragColor = vec4(0.099f,0.226f,0.335f,0.0f);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0)in vec3 coord;
|
||||
layout(location = 1)in vec3 tCoord;
|
||||
|
||||
out vec3 texCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(coord.xyz,1.0f);
|
||||
texCoord = tCoord;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#version 330 core
|
||||
|
||||
in vec2 TexCoord;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform sampler2D ourTexture;
|
||||
uniform sampler2D ourTexture2;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 tex1 = texture(ourTexture, TexCoord);
|
||||
vec4 tex2 = texture(ourTexture2,TexCoord);
|
||||
FragColor = mix(tex1 * vec4( color.xyz, 1.0), tex2, 0.2) /* *vec4( TexColor,1.0) /**/;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) in vec3 aPos;
|
||||
layout(location = 1) in vec3 aColor;
|
||||
layout(location = 2) in vec2 aTextCoord;
|
||||
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform mat4x4 camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
TexCoord = aTextCoord;
|
||||
vec4 temp = vec4(aPos.xyz,1.0);
|
||||
gl_Position = /**/ camera * /**/ temp;
|
||||
}
|
||||
|
||||
//struct
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#version 460 core
|
||||
|
||||
uniform float time;
|
||||
|
||||
out vec3 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
fragColor = vec3( 0.5f,0.336f,mod( (0.9961f + time),1.0f) );
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
#version 460 core
|
||||
|
||||
|
||||
layout(location = 0) in vec3 singleCoord;
|
||||
layout(location = 1) in vec3 locations;
|
||||
layout(location = 2) in float rotation;
|
||||
layout(location = 3) in float scale;
|
||||
|
||||
uniform mat4x4 Camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
/**/
|
||||
mat4x4 scalingMat = mat4x4
|
||||
(
|
||||
scale,0,0,0,
|
||||
0,scale,0,0,
|
||||
0,0,scale,0,
|
||||
0,0,0,1
|
||||
);
|
||||
/**/
|
||||
/**/
|
||||
|
||||
mat4x4 rotationMat = mat4x4
|
||||
(
|
||||
cos(rotation),-sin(rotation),0,0,
|
||||
sin(rotation),cos(rotation),0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
);
|
||||
|
||||
/**/
|
||||
|
||||
gl_Position = Camera * ( rotationMat * scalingMat * vec4( singleCoord.xyz , 1) + vec4( locations.xyz , 0));
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user