Commit Graph

8 Commits

Author SHA1 Message Date
Maximilian Mader 00dce71eab
Make shaders compatible with GLES 3.0
GLES, at least as used in WebGL 2, does not like mixing integers and floats,
for example:
> ERROR: 1:8: '*' : wrong operand types - no operation '*' exists that takes a left-hand operand of type 'mediump 2-component vector of float' and a right operand of type 'const int' (or there is no acceptable conversion)

This patch converts those integer constants into floats.
With this patch the shaders (apart from the master shader) can be used in WebGL contexts too.
2024-03-11 16:40:23 +01:00
Lior Halphon 5e2b6e7e9e Fix rounding errors in the LCD and CRT shaders, closes #595 2024-03-09 18:07:04 +02:00
Lior Halphon df1b89bf61 Update constants in the LCD shader that weren't updated after shaders switched to using linear RGB 2023-07-23 14:14:30 +03:00
Lior Halphon 84a193a918 Fix shader artifacts, revise AAScale4x 2022-07-29 17:08:51 +03:00
Lior Halphon a068b7b09f Fixed Metal warnings, made everything static for performance 2018-06-15 19:18:30 +03:00
Lior Halphon da7c32cb10 No more globals in shaders 2018-06-15 18:22:09 +03:00
Lior Halphon c6dba26d02 Simplify shaders 2018-06-15 18:08:54 +03:00
Lior Halphon d0202a3f9a Added LCD graphics filter; emulates low-resolution LCD artifacts 2018-02-17 20:43:48 +02:00