add no_tex and unlit shader
This commit is contained in:
parent
1a6dbfaa88
commit
166857a6df
BIN
icons/no_tex.gif
Normal file
BIN
icons/no_tex.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 867 B |
31
source/shaders/unlit.sglsl
Normal file
31
source/shaders/unlit.sglsl
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
@vs vs
|
||||||
|
in vec3 a_pos;
|
||||||
|
in vec2 a_tex_coords;
|
||||||
|
|
||||||
|
out vec2 tex_coords;
|
||||||
|
|
||||||
|
uniform vs_p {
|
||||||
|
uniform mat4 vp;
|
||||||
|
uniform mat4 model;
|
||||||
|
uniform mat4 proj;
|
||||||
|
};
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_Position = proj * vp * vec4(vec3(model * vec4(a_pos,1.0)), 1.0);
|
||||||
|
tex_coords = a_tex_coords;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
@fs fs
|
||||||
|
in vec2 tex_coords;
|
||||||
|
out vec4 color;
|
||||||
|
|
||||||
|
uniform texture2D diffuse;
|
||||||
|
uniform sampler smp;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
color = texture(sampler2D(diffuse,smp),tex_coords);
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
@program unlit vs fs
|
Loading…
Reference in a new issue