Android fixes

This commit is contained in:
luboslenco
2025-08-20 17:18:03 +02:00
parent 3036b2e097
commit cd219186e7
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -23,8 +23,10 @@ function make_colorid_picker_run(kong: node_shader_t) {
node_shader_add_texture(kong, "gbufferD");
node_shader_add_constant(kong, "invVP: float4x4", "_inv_view_proj_matrix");
node_shader_add_function(kong, str_get_pos_nor_from_depth);
node_shader_write_frag(kong, "output[0] = float4(get_pos_from_depth(float2(constants.inp.x, 1.0 - constants.inp.y), constants.invVP), tex_coord_inp.x);");
node_shader_write_frag(kong, "output[1] = float4(get_nor_from_depth(output[0].rgb, float2(constants.inp.x, 1.0 - constants.inp.y), constants.invVP, float2(1.0, 1.0) / constants.gbuffer_size), tex_coord_inp.y);");
node_shader_write_frag(kong, "var out_pos_from_depth: float3 = get_pos_from_depth(float2(constants.inp.x, 1.0 - constants.inp.y), constants.invVP);");
node_shader_write_frag(kong, "var out_nor_from_depth: float3 = get_nor_from_depth(out_pos_from_depth, float2(constants.inp.x, 1.0 - constants.inp.y), constants.invVP, float2(1.0, 1.0) / constants.gbuffer_size);");
node_shader_write_frag(kong, "output[0] = float4(out_pos_from_depth, tex_coord_inp.x);");
node_shader_write_frag(kong, "output[1] = float4(out_nor_from_depth, tex_coord_inp.y);");
}
else {
kong.frag_out = "float4[4]";
+1 -1
View File
@@ -75,7 +75,7 @@ function make_mesh_preview_run(data: material_t, matcon: material_context_t): no
node_shader_write_frag(kong, "if (opacity < " + opac + ") { discard; }");
}
kong.frag_out = "float4[3]";
kong.frag_out = "float4[2]";
kong.frag_n = true;
node_shader_add_function(kong, str_pack_float_int16);