three-d 0.7.2

A renderer which compiles to both desktop (OpenGL) and web (WebAssembly + WebGL).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14

uniform vec4 surfaceColor;
uniform float diffuse_intensity;
uniform float specular_intensity;
uniform float specular_power;

in vec3 nor;
in vec3 pos;

void main()
{
	vec3 normal = normalize(gl_FrontFacing ? nor : -nor);
	write(normal, surfaceColor.rgb, diffuse_intensity, specular_intensity, specular_power);
}