git@forge.ing.he-arc.ch:inf/1718/infographie/webgl2.git
By Johnny Da Costa
uniform sampler2D uColorTexture;
in vec3 vNormal;
in vec2 vTextureCoord;
in vec3 vLightRay;
out vec4 color;uniform sampler2D uColorTexture;
attribute vec3 vNormal;
attribute vec2 vTextureCoord;
attribute vec3 vLightRay;
varying vec4 color;WebGL
2
WebGL
1
function changeProjectionMode() {
if (withPerspective) {
withPerspective = 0
} else {
withPerspective = 1
}
}function changeProjectionMode()
{
withPerspective ^= 1;
//withPerspective = 1 - withPerspective;
}In fact, I’m a huge proponent of designing your code around the data, rather than the other way around…Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
— Linus Torvalds