Vladimír Vondruš
1f2eef7b6a
doc: document uniform buffer and multidraw support in builtin shaders.
5 years ago
Vladimír Vondruš
007360a9c8
GL,Shaders: allow draw() and friends to be chained.
...
It had a point originally, but with the new multidraw workflows it's
just annoying.
5 years ago
Vladimír Vondruš
5997d446a9
Shaders: add multidraw benchmark variants.
5 years ago
Vladimír Vondruš
2c09a2a1e6
Shaders: multidraw support in all builtin shaders.
5 years ago
Vladimír Vondruš
0863d9e811
Shaders: reassign MeshVisualizer uniforms to be contiguous for UBOs too.
5 years ago
Vladimír Vondruš
ef9da0ec96
Shaders: add UBO support to all shaders.
5 years ago
Vladimír Vondruš
1506c926f5
Shaders: doc++
5 years ago
Vladimír Vondruš
f70bbef473
Shaders: group uniform setters and texture binding functions together.
...
Otherwise it would get way too messy with the introduction of uniform
buffers.
5 years ago
Vladimír Vondruš
2066d82ea4
Shaders: suffix all existing shaders with GL.
...
To make room for Vulkan shaders. Also renaming the headers, of course
everything is still aliased to the old names (and marked as deprecated).
5 years ago
Vladimír Vondruš
3d136503d8
Updated copyright year.
5 years ago
Vladimír Vondruš
4a632553a5
Shaders: doc++
6 years ago
Vladimír Vondruš
c68ea7945b
Shaders: mention the setViewportSize() requirement clearer.
6 years ago
Vladimír Vondruš
5222cf3478
doc: change all "latest" additions/deprecations to 2020.06.
6 years ago
Vladimír Vondruš
1436b7bc86
Shaders: fix various WebGL issues with new MeshVisualizer features.
...
* Shader compilation failed with vertex, object and primitive ID
enabled due to the NO_GEOMETRY_SHADER define not being correctly
propagated
* Enabling just vertex ID visualization on WebGL caused an assert in
constructor, complaining that "at least one visualization feature has
to be enabled", which is wrong
* Defaults were not correctly set up for vertex ID rendering, causing
all-black render when setColor() wasn't called
* Forgot to list/bundle some ground truth test images for the test
case, causing the test to fail due to files not found
* The test asserted when generating mesh data due to an unhandled
corner case
* The test expected an ES2 assertion message on WebGL 2
* Flag::Wireframe now implicitly enables Flag::NoGeometryShader also on
WebGL. This was done only for ES2 previously, but WebGL doesn't have
(and won't have) geometry shaders, so it makes sense to do the same
there.
6 years ago
Vladimír Vondruš
19e0e96d74
Updated copyright year.
6 years ago
Vladimír Vondruš
062055d20d
Shaders: add vertex ID visualization to MeshVisualizer.
...
Helps visualizing face connectivity (or the lack of it).
6 years ago
Vladimír Vondruš
881a50f7fa
Shaders: clarify that object ID features need GL 3.0 extensions.
...
Important for Zink, which has neither of them.
6 years ago
Vladimír Vondruš
c03ed3af75
doc: show how to set up blending for alpha / transparency.
...
Hopefully more discoverable now also.
6 years ago
Vladimír Vondruš
3e310cbd94
Shaders: note to self: *save* before commiting.
6 years ago
Vladimír Vondruš
06ab5b33cd
Shaders: fix strict aliasing warnings.
6 years ago
Vladimír Vondruš
e3841ade7e
Shaders: object and primitive ID visualization in MeshVisualizer.
6 years ago
Vladimír Vondruš
1cb7193034
Shaders: reorder MeshVisualizer docs.
6 years ago
Vladimír Vondruš
171e8a5301
Shaders: remove MeshVisualizer default behavior.
...
It was rendering everything with a plain color, which is rather useless.
Moreover it wasn't consistent with TBN visualization where you might
actually want only the lines rendered and not the triangle.
6 years ago
Vladimír Vondruš
5b569942b8
Shaders: tangent space visualization in MeshVisualizer3D.
6 years ago
Vladimír Vondruš
74c75178de
Shaders: add a 2D variant of MeshVisualizer.
6 years ago
Vladimír Vondruš
566713e68c
Shaders: improve MeshVisualizer docs a bit.
6 years ago
Vladimír Vondruš
f3a92c2afb
Shaders: rethink generic attribute allocation from scratch.
...
This adds binormals, object IDs and instanced transformation, but has to
break existing locations in order to provide new guarantees.
6 years ago
Vladimír Vondruš
32d49db402
GL: mesh.draw(shader) -> shader.draw(mesh).
...
As usual, the old APIs are still present, but marked as deprecated.
Existing code is not updated yet to ensure I didn't break anything with
this.
This way it's much more intuitive and makes the code shorter and nicer
in many cases. Shaders are now also able to hide irrelevant
draw/dispatch APIs to avoid accidents.
6 years ago
Vladimír Vondruš
d06914a1bd
doc: hint that Optional is a safer NoCreate.
7 years ago
Vladimír Vondruš
65b589f765
New explicit-uniform-location-is-less-explicit-than-you-hoped workaround.
...
Intel drivers on Windows. Surprisingly unsurprising.
7 years ago
Vladimír Vondruš
9315175a72
Shaders: avoid MeshVisualizer::VertexIndex reusing a generic color slot.
...
Can't really future-proof that, so just adding a lot of comments
everywhere.
7 years ago
Vladimír Vondruš
a0f0015211
Shaders: de-inline uniform setters.
...
Reduces includes in the header quite a lot, yay.
7 years ago
Vladimír Vondruš
9616273e18
Shaders: improve MeshVisualizer docs.
7 years ago
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š
e6b7aa12fa
Updated copyright year.
7 years ago
Vladimír Vondruš
295843189d
doc: convert shader images to proper sRGB and HiDPI.
8 years ago
Vladimír Vondruš
7d0757ca4d
Shaders: debug output for all Flag / Flags enums / enum sets.
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š
c26075427b
Doxygen. Doxygen IS BROKEN BEYOND REPAIR.
...
I introduced *strong* enum with values, in a subnamespace, that have the
same name as completely unrelated typedefs. Guess what?! It breaks ALL
LINKS TO THOSE TYPEDEFS! **EVERYWHERE!!!**
8 years ago
Vladimír Vondruš
f7122d3ce6
Shaders: explicitly list deleted/defaulted copy/move constructor.
...
Two reasons:
* documentation
* making it actually work because the rules are so complex and ever
changing that a thing I thought "just worked" in fact did not work at
all
The Vector tests now compile again.
8 years ago
Vladimír Vondruš
8018b17bc7
Doxygen: renamed \extension[2] to \gl_extension[2].
...
So it's clear that this is not a Vulkan extension link.
8 years ago
Vladimír Vondruš
adb4547ba0
Split the OpenGL layer out, pt 20: adapted Shaders.
8 years ago
Vladimír Vondruš
bc8b8f159a
doc: there's no latex output anyway.
8 years ago
Vladimír Vondruš
3906f533bb
doc: compiled code snippets for the Shaders namespace.
...
Also not really without errors.
8 years ago
Vladimír Vondruš
6dffc0a91e
Shaders: documentation update for the new theme.
...
Also made the shader image background transparent to better fit in the
docs and updated the images to match site colors.
8 years ago
Vladimír Vondruš
623fa97970
Updated copyright year.
8 years ago
Vladimír Vondruš
7a16273e5d
Updated copyright year.
9 years ago
Vladimír Vondruš
d6f5f43d60
Shaders: modernize coding style.
...
* Always prefix private members with an underscore
* Use in-class initialization of the uniform locations
* Use {} for default flag value
9 years ago