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š
95379ace8e
Shaders: support array textures in Flat and Phong.
5 years ago
Vladimír Vondruš
a95fa9f3de
Shaders: what's up with the method order here.
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š
ef9da0ec96
Shaders: add UBO support to all shaders.
5 years ago
Vladimír Vondruš
1e6da607c9
Shaders: minor.
5 years ago
Vladimír Vondruš
96a0ecd87e
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š
beecb8fb82
Shaders: fix copypaste errors in Phong setter docs.
5 years ago
Vladimír Vondruš
3d136503d8
Updated copyright year.
5 years ago
Vladimír Vondruš
d00d1cb781
Shaders: initialize all members also with NoCreate.
...
Otherwise the _lightCount gets a random value, which makes debugging of
accidentally not created instances harder than strictly necessary.
5 years ago
Vladimír Vondruš
40ee8f0934
Shaders: document relation to glAlphaFunc().
5 years ago
Vladimír Vondruš
567b15486f
Shaders: add an ability to control specular light color to Phong.
6 years ago
Vladimír Vondruš
f69644936e
Shaders: reference the normal mapping docs from relevant APIs.
6 years ago
Vladimír Vondruš
25463db8a6
Shaders: alpha doesn't make sense for light colors.
...
I basically deprecated half of the Phong shader API. Sigh. Enjoy
updating your code.
6 years ago
Vladimír Vondruš
7257bbb871
Shaders: rework Phong to support directional and attenuated point lights.
...
This is a -- long overdue -- breaking change to the rendering output of
this shader, finally adding support for lights that get darker over
distance. The attenuation equation is basically what's documented in
LightData, and the distinction between directional and point lights is
made using a newly added the fourth component of position (which means
the old three-component setters are all deprecated). This allows the
shader code to be practically branchless, which I find to be nice.
This breaks basically all rendering output so all existing Phong and
MeshTools::compile() test outputs had to be regenerated.
6 years ago
Vladimír Vondruš
903e2c213c
Shaders: properly use bitangents in Phong normal map calculation.
6 years ago
Vladimír Vondruš
5285dcc986
Shaders: add a normal texture scale parameter to Phong.
...
It's needed to support the new material attributes supported by glTF.
The test output is slightly different as the normal coming from
the texture wasn't normalized before.
6 years ago
Vladimír Vondruš
9557de0534
Shaders,Trade: clarify use{less,ful}ness of specular alpha.
6 years ago
Vladimír Vondruš
5222cf3478
doc: change all "latest" additions/deprecations to 2020.06.
6 years ago
Vladimír Vondruš
19e0e96d74
Updated copyright year.
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š
55685ea382
Shaders: implement instancing in Phong.
6 years ago
Vladimír Vondruš
e6010388c3
Shaders: reorganize the Flat and Phong docs.
...
Dry blabber followed by dry code is worse than those two interleaved.
6 years ago
Vladimír Vondruš
02525527a4
Shaders: ability to render instanced object ID in Flat/Phong.
6 years ago
Vladimír Vondruš
c82a34c157
Shaders: doc++
6 years ago
Vladimír Vondruš
9a06b3515b
Shaders: implement texture coordinate transformation for all shaders.
...
Except MeshVisualizer and VertexColor, which don't have any texturing,
so there it's not needed. In most cases the tests are reusing existing
ground truth files and only modifying transformations / flipping images.
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š
a920722839
doc: label deprecated APIs and stuff new since 2019.10 with version info.
...
Should make new things more discoverable, avoid confusion when a
documented API isn't there and reduce the need for maintaining multiple
separate versions of the docs.
7 years ago
Vladimír Vondruš
b4f88f00ab
Remove last remaining APIs deprecated in 2018.04.
7 years ago
Vladimír Vondruš
de95eddb3f
Use the new Matrix4::normalMatrix() everywhere.
7 years ago
Vladimír Vondruš
d06914a1bd
doc: hint that Optional is a safer NoCreate.
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š
5617cb5199
Shaders: vertex color support in Phong and Flat.
7 years ago
Vladimír Vondruš
d5e4de772e
Shaders: doc++
7 years ago
Vladimír Vondruš
a3c8d8ec63
Shaders: allow Phong with zero lights.
...
Which makes it equivalent to Flat3D. Useful to reduce complexity in apps
that render models with pre-baked lighting.
7 years ago
Vladimír Vondruš
c78d6d9adc
Shaders: doc++
7 years ago
Vladimír Vondruš
87ac8a8cd2
Shaders: support object ID output in Flat and Phong.
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š
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š
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š
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