From 37b0b01fa532ed31662c07d928fa18a43dbbc77b Mon Sep 17 00:00:00 2001 From: luboslenco Date: Thu, 14 Nov 2024 23:12:30 +0100 Subject: [PATCH] More gles fixes --- armorpaint/sources/make_mesh_preview.ts | 2 +- armorsculpt/sources/make_mesh_preview.ts | 2 +- base/shaders/mesh_posnor.frag.glsl | 2 +- base/shaders/mesh_posnortex.frag.glsl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/armorpaint/sources/make_mesh_preview.ts b/armorpaint/sources/make_mesh_preview.ts index cdfa9183..4e3f3942 100644 --- a/armorpaint/sources/make_mesh_preview.ts +++ b/armorpaint/sources/make_mesh_preview.ts @@ -143,7 +143,7 @@ function make_mesh_preview_run(data: material_t, matcon: material_context_t): no node_shader_write(frag, "n /= (abs(n.x) + abs(n.y) + abs(n.z));"); node_shader_write(frag, "n.xy = n.z >= 0.0 ? n.xy : octahedron_wrap(n.xy);"); - // uint matid = 0; + // uint matid = uint(0); if (decal) { node_shader_write(frag, "frag_color[0] = vec4(n.x, n.y, roughness, pack_f32_i16(metallic, uint(0)));"); // metallic/matid diff --git a/armorsculpt/sources/make_mesh_preview.ts b/armorsculpt/sources/make_mesh_preview.ts index 950b9708..0e0837c6 100644 --- a/armorsculpt/sources/make_mesh_preview.ts +++ b/armorsculpt/sources/make_mesh_preview.ts @@ -149,7 +149,7 @@ function make_mesh_preview_run(data: material_t, matcon: material_context_t): no node_shader_write(frag, "n /= (abs(n.x) + abs(n.y) + abs(n.z));"); node_shader_write(frag, "n.xy = n.z >= 0.0 ? n.xy : octahedron_wrap(n.xy);"); - // uint matid = 0; + // uint matid = uint(0); if (decal) { node_shader_write(frag, "frag_color[0] = vec4(n.x, n.y, roughness, pack_f32_i16(metallic, uint(0)));"); // metallic/matid diff --git a/base/shaders/mesh_posnor.frag.glsl b/base/shaders/mesh_posnor.frag.glsl index d42dc8b9..94af5359 100644 --- a/base/shaders/mesh_posnor.frag.glsl +++ b/base/shaders/mesh_posnor.frag.glsl @@ -15,7 +15,7 @@ void main() { float occlusion = 1.0; n /= (abs(n.x) + abs(n.y) + abs(n.z)); n.xy = n.z >= 0.0 ? n.xy : octahedron_wrap(n.xy); - uint matid = 0; + uint matid = uint(0); frag_color[0] = vec4(n.xy, roughness, pack_f32_i16(metallic, matid)); frag_color[1] = vec4(basecol, occlusion); vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5; diff --git a/base/shaders/mesh_posnortex.frag.glsl b/base/shaders/mesh_posnortex.frag.glsl index 88231977..9315ba5d 100644 --- a/base/shaders/mesh_posnortex.frag.glsl +++ b/base/shaders/mesh_posnortex.frag.glsl @@ -16,7 +16,7 @@ void main() { float occlusion = 1.0; n /= (abs(n.x) + abs(n.y) + abs(n.z)); n.xy = n.z >= 0.0 ? n.xy : octahedron_wrap(n.xy); - uint matid = 0; + uint matid = uint(0); frag_color[0] = vec4(n.xy, roughness, pack_f32_i16(metallic, matid)); frag_color[1] = vec4(basecol, occlusion); vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;