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
15
16

uniform sampler2D tex;
uniform float diffuse_intensity;
uniform float specular_intensity;
uniform float specular_power;

in vec3 pos;
in vec3 nor;
in vec2 uvs;

void main()
{
	vec3 normal = normalize(gl_FrontFacing ? nor : -nor);
    vec3 color = texture(tex, vec2(uvs.x, 1.0 - uvs.y)).rgb;
	write(normal, color, diffuse_intensity, specular_intensity, specular_power);
}