Made it possible to compile for html5 (WIP))

This commit is contained in:
NeeEoo
2023-08-19 17:56:22 +02:00
parent 8224293439
commit b184a4825d
10 changed files with 22 additions and 14 deletions
+3 -3
View File
@@ -11,10 +11,10 @@ float uBrightness = 0.6;
vec4 getColor(vec2 pos) {
vec2 ps = (pos);
if (ps.x < 0) ps.x = 0;
if (ps.x < 0.0) ps.x = 0.0;
//else if (ps.x > 1.0 - (1.0 / iResolution.x)) ps.x = 1.0 - (1.0 / iResolution.x);
else if (ps.x > 1.0) return vec4(0.0);
if (ps.y < 0) ps.y = 0;
if (ps.y < 0.0) ps.y = 0.0;
//else if (ps.y > 1.0 - (1.0 / iResolution.y)) return ps.y = 1.0 - (1.0 / iResolution.y);
else if (ps.y > 1.0) return vec4(0.0);
return flixel_texture2D(bitmap, (ps));
@@ -42,7 +42,7 @@ vec2 random(vec2 p) {
void main() {
vec2 camPos = (openfl_TextureCoordv);
//vec2 camPos = openfl_TextureCoordv;
if (camPos.x < 0 || camPos.x > 1 || camPos.y < 0 || camPos.y > 1)
if (camPos.x < 0.0 || camPos.x > 1.0 || camPos.y < 0.0 || camPos.y > 1.0)
return;
//vec4 color = getColor(camPos);