- [Mac] Fix color picker rendering error.

This commit is contained in:
Tanasart 2024-09-10 10:21:01 +07:00
parent 3dc115e7c9
commit de76e2cf0b
5 changed files with 16 additions and 13 deletions

View file

@ -161,6 +161,7 @@ function shader_set_color(uniform, col, alpha = 1) {
function shader_set_palette(pal, pal_uni = "palette", amo_uni = "paletteAmount", max_length = 1024) {
INLINE
if(MAC) max_length = min(max_length, 256);
var _amo = min(max_length, array_length(pal));
if(_amo == 0) return;

View file

@ -1,4 +1,8 @@
#define PALETTE_LIMIT 1024
#ifdef _YY_HLSL11_
#define PALETTE_LIMIT 1024
#else
#define PALETTE_LIMIT 256
#endif
varying vec2 v_vTexcoord;
varying vec4 v_vColour;

View file

@ -1,4 +1,8 @@
#define PALETTE_LIMIT 1024
#ifdef _YY_HLSL11_
#define PALETTE_LIMIT 1024
#else
#define PALETTE_LIMIT 256
#endif
varying vec2 v_vTexcoord;
varying vec4 v_vColour;

View file

@ -1,6 +1,4 @@
#define MACOS 1
#ifndef MACOS
#ifdef _YY_HLSL11_
#extension GL_OES_standard_derivatives : enable
#endif

View file

@ -1,17 +1,13 @@
//Inigo Quilez
//Oh where would I be without you.
#define MACOS 1
#ifdef MACOS
#define MAX_SHAPES 16
#define MAX_OP 32
#else
#ifdef _YY_HLSL11_
#extension GL_OES_standard_derivatives : enable
#define MAX_SHAPES 16
#define MAX_OP 32
#endif
#define MAX_SHAPES 16
#define MAX_OP 32
varying vec2 v_vTexcoord;
varying vec4 v_vColour;