From 0c1b31a7a160fea4c194b0effa62e771746cf86c Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 19 Dec 2024 21:41:03 +0000 Subject: [PATCH] Fix 'crt_pi.glsl' OpenGL ES compatibility. Global variables require constant initialisers. --- Data/Sys/Shaders/crt_pi.glsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Data/Sys/Shaders/crt_pi.glsl b/Data/Sys/Shaders/crt_pi.glsl index 8bd1334f26..dcdb3725f3 100644 --- a/Data/Sys/Shaders/crt_pi.glsl +++ b/Data/Sys/Shaders/crt_pi.glsl @@ -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;