Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
7a894e97a0
Using ARB_explicit_uniform_location in shaders.
...
The backwards compatibility fully kills the purpose, but at least I can
test the feature somewhere :-)
14 years ago
Vladimír Vondruš
69ee2f3ebb
Shaders: don't compare ints and floats.
...
Fails on GLSL ES.
14 years ago
Vladimír Vondruš
57f3175b06
Shaders: GLSL ES doesn't have default values for uniforms.
...
If targetting GLSL ES the values are set on initialization explicitly
from application.
14 years ago
Vladimír Vondruš
81b69f17e1
Shaders: another iteration in porting of Phong and Flat shaders to GLES.
...
Hope the reduced precision won't hurt.
14 years ago
Vladimír Vondruš
084294e60b
Blind port of PhongShader to OpenGL ES 2.0.
14 years ago
Vladimír Vondruš
5ad3844626
PhongShader: fall back to GLSL 1.20 if 3.30/3.20 is not supported.
14 years ago
Vladimír Vondruš
4152e1fc9d
Better ability to create portable shaders.
...
Now the #version string is added from Shader class itself, making it
possible to do workarounds for older versions more conveniently. As a
consequence, #version must not be part of shader source anymore.
14 years ago
Vladimír Vondruš
d1f5ec7479
Phong shader: finally fixed specular highlights.
...
The highlights are now based on camera position, which is finally the
way it should be since forever.
14 years ago
Vladimír Vondruš
c91ecbef1e
Phong shader: simplified uniforms, added default values.
14 years ago
Vladimír Vondruš
5c9310605a
Finally fixed light intensity computation bug in PhongShader.
...
Both vectors passed to dot() (and thus also reflect()) must be
normalized to achieve desired result.
14 years ago
Vladimír Vondruš
5818a76850
New library with sample shaders, currently only Phong shader.
14 years ago