Jelle Raaijmakers
ae88c642c6
LibSoftGPU: Test for 1.f
equality in determining the scale factor
...
We are still not doing the right thing here, but using `<=` instead of
`<` at least gets rid of artifacts in Grim Fandango.
2022-03-27 09:19:43 -07:00
Jelle Raaijmakers
3ece3f3ed1
LibSoftGPU: Remove a lot of [ui]32x4
casts in Sampler
2022-03-08 15:32:35 +01:00
Stephan Unverwerth
8165346ae4
LibSoftGPU: Choose correct texture filter based on scale factor
...
Previously the test determining whether to use texture maginifaction or
texture minification was reversed. This commit fixes the test and also
provides an early out of the sampler in case of texture magnification
since magnification does not make use of mipmaps.
2022-03-08 00:49:31 +02:00
Stephan Unverwerth
7a19d0b4f9
LibSoftGPU: Add mipmap selection to sampler class
2022-03-03 13:50:25 +01:00
Stephan Unverwerth
6f261d0362
LibSoftGPU: Use bitwise and instead of modulus operator for POT textures
...
Where possible the sampler will wrap texture coordinates using a bitwise
and instead of a modulus. This speeds up the calculation quite a bit.
2022-01-09 16:21:13 +03:30
Stephan Unverwerth
034dc480d2
LibSoftGPU: Vectorize texture sampling and shading
2022-01-09 16:21:13 +03:30
Jelle Raaijmakers
a362a95912
LibSoftGPU: Shift U/V coordinates just once in Sampler
2022-01-04 17:48:28 +00:00
Jelle Raaijmakers
bca1b9f475
LibSoftGPU: Use AK::mix
instead of manual interpolation
2022-01-04 17:48:28 +00:00
Stephan Unverwerth
fe36edf6ae
LibSoftGPU: Put all constexpr config options into Config.h
2022-01-01 15:09:21 +01:00
Jesse Buhagiar
ca093f442c
LibSoftGPU: Mark wrap_clamp
as [[maybe_unused]]
...
This was breaking the fuzzer build becaues the function is not used
if the `CLAMP_DEPRECATED_BEHAVIOR` constexpr is not `true` during
compile time.
2021-12-27 15:08:19 +02:00
Jelle Raaijmakers
f856f49edb
LibSoftGPU: Clamp to edge instead of border
...
According to the Khronos FAQ on texture edge sampling, the `GL_CLAMP`
option was never implemented in hardware and as such, it was
deprecated. A lot of applications and games depend on `GL_CLAMP` not
really meaning `GL_CLAMP` but `GL_CLAMP_TO_EDGE`, so we introduce an
option to toggle this behavior at compile-time.
2021-12-27 11:58:43 +01:00
Stephan Unverwerth
b8bb72abbe
LibSoftGPU: Add device method for creating images
2021-12-24 05:10:28 -08:00