git-svn-id: svn://db.shs.com.ru/libs@626 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-11-22 15:20:52 +00:00
parent 5e2b563d57
commit 09248aae34
128 changed files with 16038 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// vert //
out vec3 geom_normal;
out vec4 object_color;
void main(void) {
qgl_FragTexture = qgl_Texture;
gl_Position = qgl_ftransform();
mat3 nmat = qgl_getNormalMatrix();
geom_normal = normalize(nmat * qgl_Normal);
object_color = qgl_ObjectColor;
}
// frag //
in vec3 geom_normal;
in vec4 object_color;
void main(void) {
vec3 normal = normalize(geom_normal);
float l = max(0, dot(normal, vec3(0,0,1)));
qgl_FragColor = object_color * (l * 0.6 + 0.4);
}