More gles fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user