GLSL
- semicolons are required
- distinction between float and integer numbers
- float numbers must contain a
. (eg. 1.0, .5, 5.) - no implicit conversion between
float and int - built-in vector/matrix arithmetics
Data Types
- primitives (
bool, int, float, double) - vectors (
vec2, vec3, vec4) - matrices (
mat2, mat3, mat4) - texture data (
sampler2D)
Variable types
attribute – vertex data from WebGL buffers, only accessible in the vertex shader.uniform – like global variables you pass in from the JavaScript side before executing the programvarying – passing attributes from the vertex shader to the fragment shader and interpolate in between coordinates