Initial commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
in vec2 Texcoord;
|
||||
|
||||
OUTPUT
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
outColor = texture(tex, Texcoord);
|
||||
}
|
||||
11
engines/playground3d/shaders/playground3d_bitmap.vertex
Normal file
11
engines/playground3d/shaders/playground3d_bitmap.vertex
Normal file
@@ -0,0 +1,11 @@
|
||||
in vec2 position;
|
||||
in vec2 texcoord;
|
||||
|
||||
out vec2 Texcoord;
|
||||
|
||||
uniform vec2 offsetXY;
|
||||
|
||||
void main() {
|
||||
Texcoord = texcoord;
|
||||
gl_Position = vec4(position + offsetXY, 0.0, 1.0);
|
||||
}
|
||||
14
engines/playground3d/shaders/playground3d_cube.fragment
Normal file
14
engines/playground3d/shaders/playground3d_cube.fragment
Normal file
@@ -0,0 +1,14 @@
|
||||
in vec2 Texcoord;
|
||||
in vec3 Color;
|
||||
|
||||
OUTPUT
|
||||
|
||||
uniform UBOOL textured;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(Color, 1.0);
|
||||
if (UBOOL_TEST(textured)) {
|
||||
outColor *= texture(tex, Texcoord);
|
||||
}
|
||||
}
|
||||
27
engines/playground3d/shaders/playground3d_cube.vertex
Normal file
27
engines/playground3d/shaders/playground3d_cube.vertex
Normal file
@@ -0,0 +1,27 @@
|
||||
in vec3 position;
|
||||
in vec3 color;
|
||||
in vec3 normal;
|
||||
in vec2 texcoord;
|
||||
|
||||
uniform mat4 mvpMatrix;
|
||||
uniform mat4 projMatrix;
|
||||
uniform mat4 modelMatrix;
|
||||
uniform mat4 rotateMatrix;
|
||||
uniform UBOOL textured;
|
||||
uniform vec3 modelPos;
|
||||
|
||||
out vec2 Texcoord;
|
||||
out vec3 Color;
|
||||
|
||||
void main() {
|
||||
Texcoord = texcoord;
|
||||
|
||||
vec4 pos = rotateMatrix * vec4(position, 1.0);
|
||||
gl_Position = mvpMatrix * (pos + vec4(modelPos, 1.0));
|
||||
|
||||
if (UBOOL_TEST(textured)) {
|
||||
Color = vec3(1.0);
|
||||
} else {
|
||||
Color = color;
|
||||
}
|
||||
}
|
||||
8
engines/playground3d/shaders/playground3d_fade.fragment
Normal file
8
engines/playground3d/shaders/playground3d_fade.fragment
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
OUTPUT
|
||||
|
||||
uniform float alphaLevel;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(0.0, 0.0, 0.0, alphaLevel);
|
||||
}
|
||||
5
engines/playground3d/shaders/playground3d_fade.vertex
Normal file
5
engines/playground3d/shaders/playground3d_fade.vertex
Normal file
@@ -0,0 +1,5 @@
|
||||
in vec2 position;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
OUTPUT
|
||||
|
||||
uniform vec3 triColor;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(triColor, 1.0);
|
||||
}
|
||||
12
engines/playground3d/shaders/playground3d_offset.vertex
Normal file
12
engines/playground3d/shaders/playground3d_offset.vertex
Normal file
@@ -0,0 +1,12 @@
|
||||
in vec2 position;
|
||||
|
||||
uniform mat4 mvpMatrix;
|
||||
uniform mat4 projMatrix;
|
||||
uniform mat4 modelMatrix;
|
||||
uniform mat4 rotateMatrix;
|
||||
uniform vec3 modelPos;
|
||||
|
||||
void main() {
|
||||
vec4 pos = rotateMatrix * vec4(position, 0.0, 1.0);
|
||||
gl_Position = mvpMatrix * (pos + vec4(modelPos, 1.0));
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
OUTPUT
|
||||
|
||||
uniform vec3 color;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(color, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
in vec2 position;
|
||||
|
||||
uniform vec2 offset;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(position + offset, 0.0, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user