Fix 'crt_pi.glsl' OpenGL ES compatibility.

Global variables require constant initialisers.
This commit is contained in:
Clownacy 2024-12-19 21:41:03 +00:00 committed by GitHub
parent b1537ca232
commit 0c1b31a7a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,12 +159,12 @@ much the mask type darkens the screen.
[MASK_TYPE has been replaced with SHADOW_MASK and MASK_TRINITRON]
*/
vec2 CURVATURE_DISTORTION = vec2(GetOption(CURVATURE_X), GetOption(CURVATURE_Y));
// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.
vec2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);
vec2 Distort(vec2 coord)
{
vec2 CURVATURE_DISTORTION = vec2(GetOption(CURVATURE_X), GetOption(CURVATURE_Y));
// Barrel distortion shrinks the display area a bit, this will allow us to counteract that.
vec2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);
// coord *= screenScale; // not necessary in slang
coord -= vec2(0.5);
float rsq = coord.x * coord.x + coord.y * coord.y;