1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:27:35 +00:00

LibSoftGPU: Use multiplication instead of division for linear fog

Sampling profiling shows a reduction of nearly 60% for the linear fog
calculation case.
This commit is contained in:
Jelle Raaijmakers 2023-02-17 17:10:35 +01:00 committed by Andreas Kling
parent f54d9c0a61
commit 62285e0569
2 changed files with 4 additions and 1 deletions

View file

@ -110,6 +110,7 @@ private:
Vector<Triangle> m_triangle_list;
Vector<Triangle> m_processed_triangles;
Vector<GPU::Vertex> m_clipped_vertices;
float m_one_over_fog_depth;
Array<Sampler, GPU::NUM_TEXTURE_UNITS> m_samplers;
bool m_samplers_need_texture_staging { false };
Array<GPU::Light, NUM_LIGHTS> m_lights;