Vladimír Vondruš
cd5f5e7ff9
Shaders: add ColorOutput constant to all shaders for consistency.
7 years ago
Vladimír Vondruš
b030fa9ad6
Shaders: huh, why this isn't done here?
7 years ago
Vladimír Vondruš
c78d6d9adc
Shaders: doc++
7 years ago
Vladimír Vondruš
1696ffb177
Shaders: destruct test scaffolding in reverse order.
7 years ago
Vladimír Vondruš
87ac8a8cd2
Shaders: support object ID output in Flat and Phong.
7 years ago
Vladimír Vondruš
fd67e42df1
Shaders: don't test for ES3 at runtime.
...
This only generates code that will be never executed. Tested with Flat
and Phong, the other shaders don't have rendering tests yet but since
the change is the same, I assume it will work there as well.
7 years ago
Vladimír Vondruš
b3a455fdaa
Shaders: adapt Flat / Phong to more test results.
7 years ago
Vladimír Vondruš
d932ca3d78
Shaders: whoops, a leftover after pruning depth test from the tests.
7 years ago
Vladimír Vondruš
2cfe5199b4
Shaders: make Phong uniform location calculations more parametrized.
7 years ago
Vladimír Vondruš
000833f86b
Shaders: these cheats for getting code coverage are not needed anymore.
...
The testing is *real* now.
7 years ago
Vladimír Vondruš
c60ef6039f
Shaders: test Phong normal texture multi-bind as well.
7 years ago
Vladimír Vondruš
fd6bf54769
Shaders: no, these are not expected to fail on macOS.
7 years ago
Vladimír Vondruš
6a5a5496f5
Shaders: properly test all constructor combinations of Flat.
7 years ago
Vladimír Vondruš
e6d6d181a9
Shaders: inflate fuzzy thresholds for FlatGLTest.
...
Tested on SwiftShader, WebGL 1 and 2.
7 years ago
Vladimír Vondruš
1246c53c97
Shaders: inflate fuzzy thresholds for PhongGLTest, add some XFAILs.
...
Tested on WebGL 1 and 2, SwiftShader ES2 and ES3 and ARM Mali ES2 and
ES3 now, all pass. SwiftShader has a bit different output for zero
shininess, but that's a corner case so I'm not going to investigate
further, just adding the expected wrong output to check against as well.
7 years ago
Vladimír Vondruš
08f6615048
Shaders: make alpha mask = 1.0 do what's expected.
...
Yay tests!
7 years ago
Vladimír Vondruš
c98b65b82f
Shaders: fix setup of the tangent attribute on ES2.
...
Yay tests!
7 years ago
Vladimír Vondruš
91f1e1ccb5
Shaders: fix an assertion in Phong::bindTextures().
...
Caught by the tests!
7 years ago
Vladimír Vondruš
8276405ce3
Shaders: rendering tests for Flat shader.
7 years ago
Vladimír Vondruš
87764900a4
Shaders: rendering tests for Phong shader.
7 years ago
Vladimír Vondruš
3d5f50ac49
Test: use the new setTestCaseTemplateName().
7 years ago
Vladimír Vondruš
8d98f1161e
Shaders: clamp shininess factor in Phong to minimize artifacts.
...
I feel this makes the shader code unnecessarily slow to handle bad
parameters. But eh, until I actually benchmark, I shouldn't be making
assumptions.
7 years ago
Vladimír Vondruš
0cb4ded506
Shaders: add normal texture support to Phong.
...
Note -- since there are no visual tests for Phong yet, this is done in
the least intrusive manner to avoid breaking current functionality. It's
likely very underperforming due to the matric calculation per fragment,
it'll get optimized once I have proper tests.
7 years ago
Vladimír Vondruš
528e3822dc
Shaders: added Tangent generic vertex attribute.
7 years ago
Vladimír Vondruš
a1d3f734d6
Shaders: generate textured Phong VS only if textures are actually used.
...
Previously this got enabled also when AlphaMask was enabled, but no
texture. That's a strange case but nevertheless, let's be precise.
7 years ago
Vladimír Vondruš
b1ecff0052
Shaders: have a definition for the generic color attribute.
7 years ago
Vladimír Vondruš
3626562e1d
Adapted to Corrade changes.
...
Mostly missing includes now.
7 years ago
Vladimír Vondruš
8e8010c40b
Document and print helpful error messages for GL-dependent features.
7 years ago
Vladimír Vondruš
8ba2cac0ee
DebugTools, MeshTools, TextureTools: handle broken gl_VertexID.
...
DebugTools::textureSubImage(), MeshTools::fullScreenTriangle() and
TextureTools::distanceField() all plagued by this on SwiftShader.
7 years ago
Vladimír Vondruš
a36d8eb033
Remove use of std::reference_wrapper where possible.
...
What's left is *a lot* of places taking monstrous
std::vector<std::reference_wrapper> and that can't be changed to
std::vector<Containers::Reference> in a source-compatible way. Even that
would be only a temporary change, since the goal is to fully avoid
dependency on STL in those cases.
The final version of these APIs should take
Containers::ArrayView<Containers::Reference> and be implicitly
convertible froom e.g. std::vector<Containers::Reference>. That's
definitely possible, but not in time for 2019.01, so instead of forcing
users to temporary pass a `{vec.begin(), vec.size()}` everywhere instead
of just `vec`, I'm rather keeping these APIs intact.
7 years ago
Vladimír Vondruš
2149f7b869
Wrap all tests in unnamed namespaces.
...
This makes the compiler warn about test cases that aren't ever used,
which is a good thing.
7 years ago
Vladimír Vondruš
e6b7aa12fa
Updated copyright year.
7 years ago
Vladimír Vondruš
de3081042e
Shaders: avoid overflowing alpha with multiple lights.
...
Still not sure what the proper semantics of light alpha should be.
8 years ago
Vladimír Vondruš
295843189d
doc: convert shader images to proper sRGB and HiDPI.
8 years ago
Vladimír Vondruš
799d9b80db
Doc++
8 years ago
Vladimír Vondruš
b615e1ae28
Shaders: support multiple lights in Phong.
8 years ago
Vladimír Vondruš
7d0757ca4d
Shaders: debug output for all Flag / Flags enums / enum sets.
8 years ago
Vladimír Vondruš
b5dc42f332
Shaders: I f'ed up the Flat shader defaults, again.
...
Leftover from 0e9cb6945e . Documented
properly, but not implemented. I *need* the shader tests ASAP.
8 years ago
Vladimír Vondruš
a1ef8550d3
Shaders: don't multiply Phong diffuse alpha with light intensity.
...
That messes up with alpha mask (basically, areas that receive less than
50% light get clipped away).
8 years ago
Vladimír Vondruš
02f0e0aeb9
Doc++
8 years ago
Vladimír Vondruš
fd1572a3a3
Shaders: default ambient color in Phong to transparent black.
...
Makes it possible to support alpha-masked drawing out of the box,
shouldn't have any negative effect on anything else.
8 years ago
Vladimír Vondruš
0e9cb6945e
Shaders: define reasonable uniform defaults for all shaders.
...
Plus a bit of cleanup / fixing broken English.
8 years ago
Vladimír Vondruš
8e73cad1c1
Shaders: make the preprocessor less crazy and consistent with 2D.
...
What the heck. Probably 2011 me is to blame.
8 years ago
Vladimír Vondruš
daf287d2a6
Shaders: classical alpha masking support in Phong and Flat.
...
Slow and ugly, is here only for making quick'n'dirty alpha masked
drawing without a need for blending or depth sorting. Oh and also to
support the glTF alpha mask feature. Again, beware: *slow*.
8 years ago
Vladimír Vondruš
5201176cdb
Shaders: assert texturing is enabled when calling Flat::bindTexture().
8 years ago
Vladimír Vondruš
412ee9a04b
Shaders: simplify Flat shader test.
8 years ago
Vladimír Vondruš
f0a868da9c
Shaders: assert on Phong::bindTexture*() if no texture was enabled.
8 years ago
Vladimír Vondruš
bbebfa971f
Shaders: simplify the Phong construction test a bit.
...
Ugh.
8 years ago
Vladimír Vondruš
460df2b97c
Shaders: doc++
8 years ago
Vladimír Vondruš
6885f0647b
Shaders: minor code reordering.
8 years ago