From c4cb66b9622362b679878d570c3939c785dcadad Mon Sep 17 00:00:00 2001 From: Digital Artifex <7929434+DigitalArtifex@users.noreply.github.com> Date: Thu, 23 Oct 2025 01:48:35 -0400 Subject: [PATCH] Added 320 and ES profiles to compilation --- tools/ShaderToyProcessor.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/ShaderToyProcessor.py b/tools/ShaderToyProcessor.py index 6a395b8..9d276fb 100644 --- a/tools/ShaderToyProcessor.py +++ b/tools/ShaderToyProcessor.py @@ -181,7 +181,7 @@ def compile(): # Construct and execute the command cmd = [ - qsb, '--glsl', '330', '--hlsl', '50', '--msl', '12', + qsb, '--glsl', '330 es,330,320 es,320', '--hlsl', '50', '--msl', '12', '-o', output_file_path, source_file_path ] @@ -266,11 +266,15 @@ def process(): common_file_contents = re.sub(r'void\s+main\s*\([^)]*\)\s*\{[\s\S]*?\}', '', common_file_contents) # 3. Remove declarations in the common file that match the replacement vars - for var in variables_to_update: - pattern = r'(\w*\s*)(' + var + ')' - replacement = r'\1_\2' + # -- This really needs to be moved into a detection function that checks for + # -- ubuf names within function scopes. This is messing with correctly formatted + # -- defines in the common file + + # for var in variables_to_update: + # pattern = r'(\w*\s*)(' + var + ')' + # replacement = r'\1_\2' - common_file_contents = re.sub(pattern, replacement, common_file_contents) + # common_file_contents = re.sub(pattern, replacement, common_file_contents) for file in files:# Stage for processing, if a shader if file.endswith('.frag') and not file == 'Common.frag':