Port to web for free

This commit is contained in:
PedroEdiaz
2024-11-19 21:54:22 -06:00
parent c4016d239a
commit 61b014a803
4 changed files with 71 additions and 27 deletions

View File

@@ -1,6 +1,10 @@
const char * vs =
#ifdef EMSCRIPTEN
"#version 300 es\n"
"precision highp float;"
#else
"#version 330 core\n"
#endif
"layout (location = 0) in float aPos_x;"
"layout (location = 1) in float aPos_y;"
"layout (location = 2) in float aPos_z;"
@@ -32,8 +36,14 @@ const char * vs =
const char * fs_plain =
"#version 330 core\n"
#ifdef EMSCRIPTEN
"#version 300 es\n"
"precision highp float;"
"precision highp sampler2DArray;"
#else
"#version 330 core\n"
#endif
"uniform sampler2DArray palette;"
"in float index;"
@@ -47,7 +57,13 @@ const char * fs_plain =
"}";
const char * fs =
#ifdef EMSCRIPTEN
"#version 300 es\n"
"precision highp float;"
"precision highp sampler2DArray;"
#else
"#version 330 core\n"
#endif
"uniform sampler2DArray palette;"