Skip to content

Commit

Permalink
More gles fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Nov 14, 2024
1 parent a199eac commit 37b0b01
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion armorpaint/sources/make_mesh_preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion armorsculpt/sources/make_mesh_preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion base/shaders/mesh_posnor.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion base/shaders/mesh_posnortex.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 37b0b01

Please sign in to comment.