1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

LibGL+LibGPU+LibSoftGPU: Implement matrix stack per texture unit

Each texture unit now has its own texture transformation matrix stack.
Introduce a new texture unit configuration that is synced when changed.
Because we're no longer passing a silly `Vector` when drawing each
primitive, this results in a slightly improved frames per second :^)
This commit is contained in:
Jelle Raaijmakers 2022-09-05 00:40:27 +02:00 committed by Linus Groh
parent 1540c56e6c
commit 00d46e5d77
22 changed files with 208 additions and 152 deletions

View file

@ -61,7 +61,7 @@ static GPU::Vertex clip_intersection_point(GPU::Vertex const& p1, GPU::Vertex co
out.eye_coordinates = mix(p1.eye_coordinates, p2.eye_coordinates, a);
out.clip_coordinates = mix(p1.clip_coordinates, p2.clip_coordinates, a);
out.color = mix(p1.color, p2.color, a);
for (size_t i = 0; i < GPU::NUM_SAMPLERS; ++i)
for (size_t i = 0; i < GPU::NUM_TEXTURE_UNITS; ++i)
out.tex_coords[i] = mix(p1.tex_coords[i], p2.tex_coords[i], a);
out.normal = mix(p1.normal, p2.normal, a);
return out;