unai: Use 8.8 RGB triplet format for gouraud shading
authorPaul Cercueil <paul@crapouillou.net>
Tue, 31 Oct 2023 17:11:39 +0000 (18:11 +0100)
committernotaz <notasas@gmail.com>
Thu, 2 Nov 2023 16:08:35 +0000 (18:08 +0200)
commitb3bce60ef65914650716c6caea21480071e3405c
tree83edf54bbadc8b7b81064e9d5bd924c381d7780f
parent846344d40d18b731488e874ea67ef5d66173f62b
unai: Use 8.8 RGB triplet format for gouraud shading

Use a new 'gcol_t' type which fits in 64 bits, and encode each color
component into a 8.8 fixed-point format.

This boosts the precision of the gouraud shading algorithm, at almost
zero cost.

Fixes #320.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
plugins/gpu_unai/gpu_inner.h
plugins/gpu_unai/gpu_inner_light.h
plugins/gpu_unai/gpu_unai.h