Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Echoing what was mentioned before, WebGL builds can't use this asset due to accessing array/matrices with non-constant values (https://stackoverflow.com/questions/19529690/index-expression-must-be-constant-w...)

Here's the error in the logs and the function it's referring to:

Error compiling shader ('feniks.linear_gradient', 'renpy.geometry', 'renpy.texture'): b"ERROR: 0:29: '[]' : Index expression must be constant\nERROR: 0:32: '[]' : Index expression must be constant\nERROR: 0:35: '[]' : Index expression must be constant\nERROR: 0:38: '[]' : Index expression must be constant\n
vec4 get_color(int ind, mat4 color1, mat4 color2, mat4 color3, mat4 color4) {
 28             if (ind < 4) {
 29                 vec4 ret = color1[ind];
 30                 return ret;
 31             } else if (ind < 8) {
 32                 vec4 ret2 = color2[ind-4];
 33                 return ret2;
 34             } else if (ind < 12) {
 35                 vec4 ret3 = color3[ind-8];
 36                 return ret3;
 37             } else {
 38                 vec4 ret4 = color4[ind-12];
 39                 return ret4;
 40             }
 41         }

Tried to fix some of it myself but I couldn't get too far myself :"] Awesome asset, though! Might just be worth adding a little note that it's not WebGL compatible (as of now, maybe if Ren'Py updates its GLSL ES version)