Build fixes
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
|
||||
#include "../../../base/sources/plugin_api.h"
|
||||
|
||||
void plugin_embed() {
|
||||
JSValue global_obj = JS_GetGlobalObject(js_ctx);
|
||||
// void plugin_embed() {
|
||||
// JSValue global_obj = JS_GetGlobalObject(js_ctx);
|
||||
|
||||
JS_FreeValue(js_ctx, global_obj);
|
||||
}
|
||||
// JS_FreeValue(js_ctx, global_obj);
|
||||
// }
|
||||
|
||||
@@ -12,6 +12,8 @@ project.add_project("../base");
|
||||
project.add_tsfiles("../armorpaint/sources");
|
||||
project.add_tsfiles("../armorpaint/sources/nodes");
|
||||
project.add_shaders("../armorpaint/shaders/*.glsl");
|
||||
project.add_project("../armorpaint/plugins");
|
||||
|
||||
project.add_tsfiles("sources");
|
||||
project.add_tsfiles("sources/nodes");
|
||||
project.add_shaders("shaders/*.glsl");
|
||||
@@ -23,4 +25,5 @@ project.add_assets("../armorpaint/assets/plugins/hello_world.js", { destination:
|
||||
project.add_assets("assets/meshes/*", { destination: "data/meshes/{name}", noembed: true });
|
||||
project.add_assets("assets/readme/readme.txt", { destination: "{name}" });
|
||||
|
||||
project.flatten();
|
||||
return project;
|
||||
|
||||
@@ -157,7 +157,7 @@ function tab_objects_draw(htab: ui_handle_t) {
|
||||
let t: transform_t = context_raw.selected_object.transform;
|
||||
let local_pos: vec4_t = t.loc;
|
||||
let scale: vec4_t = t.scale;
|
||||
let rot: quat_t = quat_get_euler(t.rot);
|
||||
let rot: vec4_t = quat_get_euler(t.rot);
|
||||
let dim: vec4_t = t.dim;
|
||||
rot = vec4_mult(rot, 180 / 3.141592);
|
||||
let f: f32 = 0.0;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -17,7 +17,7 @@ function make_brush_run(vert: node_shader_t, frag: node_shader_t) {
|
||||
|
||||
node_shader_add_uniform(frag, "mat4 W", "_world_matrix");
|
||||
|
||||
node_shader_write_attrib(frag, "vec3 wposition = mul(texelFetch(texpaint_undo, ivec2(tex_coord.x * textureSize(texpaint_undo, 0).x, tex_coord.y * textureSize(texpaint_undo, 0).y), 0), W).xyz;");
|
||||
node_shader_write_attrib(frag, "vec3 wposition = (mul(texelFetch(texpaint_undo, ivec2(tex_coord.x * textureSize(texpaint_undo, 0).x, tex_coord.y * textureSize(texpaint_undo, 0).y), 0), W)).xyz;");
|
||||
|
||||
///if (arm_direct3d11 || arm_direct3d12 || arm_metal || arm_vulkan)
|
||||
node_shader_write(frag, "float depthlast = textureLod(gbufferD, inplast.xy, 0.0).r;");
|
||||
|
||||
@@ -792,7 +792,6 @@ type project_format_t = {
|
||||
camera_fov?: f32;
|
||||
swatches?: swatch_color_t[];
|
||||
|
||||
///if (is_paint || is_sculpt)
|
||||
brush_nodes?: ui_node_canvas_t[];
|
||||
brush_icons?: buffer_t[];
|
||||
material_nodes?: ui_node_canvas_t[];
|
||||
@@ -803,12 +802,9 @@ type project_format_t = {
|
||||
mesh_datas?: mesh_data_t[];
|
||||
mesh_assets?: string[];
|
||||
mesh_icons?: buffer_t[];
|
||||
///end
|
||||
|
||||
///if is_paint
|
||||
atlas_objects?: i32[];
|
||||
atlas_names?: string[];
|
||||
///end
|
||||
|
||||
///if is_lab
|
||||
material?: ui_node_canvas_t;
|
||||
@@ -841,7 +837,6 @@ type swatch_color_t = {
|
||||
subsurface?: f32;
|
||||
};
|
||||
|
||||
///if (is_paint || is_sculpt)
|
||||
type layer_data_t = {
|
||||
name?: string;
|
||||
res?: i32; // Width pixels
|
||||
@@ -857,7 +852,6 @@ type layer_data_t = {
|
||||
blending?: i32;
|
||||
parent?: i32;
|
||||
visible?: bool;
|
||||
///if is_paint
|
||||
texpaint_nor?: buffer_t;
|
||||
texpaint_pack?: buffer_t;
|
||||
paint_base?: bool;
|
||||
@@ -871,6 +865,4 @@ type layer_data_t = {
|
||||
paint_height_blend?: bool;
|
||||
paint_emis?: bool;
|
||||
paint_subs?: bool;
|
||||
///end
|
||||
};
|
||||
///end
|
||||
|
||||
@@ -535,12 +535,12 @@ float ltc_evaluate(vec3 N, vec3 V, float dotnv, vec3 P, mat3 Minv, vec3 points0,
|
||||
";
|
||||
|
||||
let str_get_pos_from_depth: string = " \
|
||||
vec3 get_pos_from_depth(vec2 uv, mat4 invVP, textureArg(gbufferD)) { \
|
||||
#if defined(HLSL) || defined(METAL) || defined(SPIRV) \n\
|
||||
float depth = textureLod(gbufferD, vec2(uv.x, 1.0 - uv.y), 0.0).r; \
|
||||
#else \n\
|
||||
float depth = textureLod(gbufferD, uv, 0.0).r; \
|
||||
#endif \n\
|
||||
vec3 get_pos_from_depth(vec2 uv, mat4 invVP, textureArg(gbufferD)) { \n\
|
||||
#ifdef GLSL \n\
|
||||
float depth = textureLod(gbufferD, uv, 0.0).r; \n\
|
||||
#else \n\
|
||||
float depth = textureLod(gbufferD, vec2(uv.x, 1.0 - uv.y), 0.0).r; \n\
|
||||
#endif \n\
|
||||
vec4 wpos = vec4(uv * 2.0 - 1.0, depth * 2.0 - 1.0, 1.0); \
|
||||
wpos = mul(wpos, invVP); \
|
||||
return wpos.xyz / wpos.w; \
|
||||
|
||||
Reference in New Issue
Block a user