mirror of https://gitee.com/cf-fz/WebCAD.git
parent
fca5c203ef
commit
f569c62313
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
uniform vec3 SurfaceColor;
|
||||||
|
varying float NdotL;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
gl_FragColor = vec4 (SurfaceColor * NdotL, 1.0);
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
varying float NdotL;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec3 trans_norm = normalize(normalMatrix * normal);
|
||||||
|
vec3 lightVec = normalize(vec3(-1.0, 1.0, 1.0));
|
||||||
|
NdotL = (dot (lightVec, trans_norm) + 1.0) *0.5;
|
||||||
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
||||||
|
}
|
Loading…
Reference in new issue