paint: cleanup
This commit is contained in:
@@ -460,9 +460,9 @@ void slot_layer_resize_and_set_bits(slot_layer_t *raw) {
|
||||
gpu_delete_texture(_texpaint_sculpt);
|
||||
|
||||
render_target_t *srt = any_map_get(rts, string("texpaint_sculpt%s", raw->ext));
|
||||
srt->width = res_x;
|
||||
srt->height = res_y;
|
||||
srt->_image = raw->texpaint_sculpt;
|
||||
srt->width = res_x;
|
||||
srt->height = res_y;
|
||||
srt->_image = raw->texpaint_sculpt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+27
-27
@@ -1104,39 +1104,39 @@ static int16_t mesh__ScaleZ_nor[] = {0, 0, 0, 0, 0, 0, 0,
|
||||
static uint32_t mesh__ScaleZ_indices[] = {0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11,
|
||||
12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23};
|
||||
|
||||
static int16_t mesh__TranslateX_pos[] = {-11796, -3276, -3276, 0, -11796, -3276, 3276, 0, -11796, 3276, 3276, 0, -11796, 3276, -3276, 0,
|
||||
-11796, 3276, -3276, 0, -11796, 3276, 3276, 0, 11796, 3276, 3276, 0, 11796, 3276, -3276, 0,
|
||||
11796, 3276, -3276, 0, 11796, 3276, 3276, 0, 11796, -3276, 3276, 0, 11796, -3276, -3276, 0,
|
||||
11796, -3276, -3276, 0, 11796, -3276, 3276, 0, -11796, -3276, 3276, 0, -11796, -3276, -3276, 0,
|
||||
-11796, 3276, -3276, -32767, 11796, 3276, -3276, -32767, 11796, -3276, -3276, -32767, -11796, -3276, -3276, -32767,
|
||||
11796, 3276, 3276, 32767, -11796, 3276, 3276, 32767, -11796, -3276, 3276, 32767, 11796, -3276, 3276, 32767};
|
||||
static int16_t mesh__TranslateX_nor[] = {-32767, 0, -32767, 0, -32767, 0, -32767, 0, 0, 32767, 0, 32767, 0, 32767, 0, 32767,
|
||||
32767, 0, 32767, 0, 32767, 0, 32767, 0, 0, -32767, 0, -32767, 0, -32767, 0, -32767,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static int16_t mesh__TranslateX_pos[] = {-11796, -3276, -3276, 0, -11796, -3276, 3276, 0, -11796, 3276, 3276, 0, -11796, 3276, -3276, 0,
|
||||
-11796, 3276, -3276, 0, -11796, 3276, 3276, 0, 11796, 3276, 3276, 0, 11796, 3276, -3276, 0,
|
||||
11796, 3276, -3276, 0, 11796, 3276, 3276, 0, 11796, -3276, 3276, 0, 11796, -3276, -3276, 0,
|
||||
11796, -3276, -3276, 0, 11796, -3276, 3276, 0, -11796, -3276, 3276, 0, -11796, -3276, -3276, 0,
|
||||
-11796, 3276, -3276, -32767, 11796, 3276, -3276, -32767, 11796, -3276, -3276, -32767, -11796, -3276, -3276, -32767,
|
||||
11796, 3276, 3276, 32767, -11796, 3276, 3276, 32767, -11796, -3276, 3276, 32767, 11796, -3276, 3276, 32767};
|
||||
static int16_t mesh__TranslateX_nor[] = {-32767, 0, -32767, 0, -32767, 0, -32767, 0, 0, 32767, 0, 32767, 0, 32767, 0, 32767,
|
||||
32767, 0, 32767, 0, 32767, 0, 32767, 0, 0, -32767, 0, -32767, 0, -32767, 0, -32767,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static uint32_t mesh__TranslateX_indices[] = {0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11,
|
||||
12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23};
|
||||
|
||||
static int16_t mesh__TranslateY_pos[] = {3276, -11796, -3276, 0, 3276, -11796, 3276, 0, -3276, -11796, 3276, 0, -3276, -11796, -3276, 0,
|
||||
-3276, -11796, -3276, 0, -3276, -11796, 3276, 0, -3276, 11796, 3276, 0, -3276, 11796, -3276, 0,
|
||||
-3276, 11796, -3276, 0, -3276, 11796, 3276, 0, 3276, 11796, 3276, 0, 3276, 11796, -3276, 0,
|
||||
3276, 11796, -3276, 0, 3276, 11796, 3276, 0, 3276, -11796, 3276, 0, 3276, -11796, -3276, 0,
|
||||
-3276, -11796, -3276, -32767, -3276, 11796, -3276, -32767, 3276, 11796, -3276, -32767, 3276, -11796, -3276, -32767,
|
||||
-3276, 11796, 3276, 32767, -3276, -11796, 3276, 32767, 3276, -11796, 3276, 32767, 3276, 11796, 3276, 32767};
|
||||
static int16_t mesh__TranslateY_nor[] = {0, -32767, 0, -32767, 0, -32767, 0, -32767, -32767, 0, -32767, 0, -32767, 0, -32767, 0,
|
||||
0, 32767, 0, 32767, 0, 32767, 0, 32767, 32767, 0, 32767, 0, 32767, 0, 32767, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static int16_t mesh__TranslateY_pos[] = {3276, -11796, -3276, 0, 3276, -11796, 3276, 0, -3276, -11796, 3276, 0, -3276, -11796, -3276, 0,
|
||||
-3276, -11796, -3276, 0, -3276, -11796, 3276, 0, -3276, 11796, 3276, 0, -3276, 11796, -3276, 0,
|
||||
-3276, 11796, -3276, 0, -3276, 11796, 3276, 0, 3276, 11796, 3276, 0, 3276, 11796, -3276, 0,
|
||||
3276, 11796, -3276, 0, 3276, 11796, 3276, 0, 3276, -11796, 3276, 0, 3276, -11796, -3276, 0,
|
||||
-3276, -11796, -3276, -32767, -3276, 11796, -3276, -32767, 3276, 11796, -3276, -32767, 3276, -11796, -3276, -32767,
|
||||
-3276, 11796, 3276, 32767, -3276, -11796, 3276, 32767, 3276, -11796, 3276, 32767, 3276, 11796, 3276, 32767};
|
||||
static int16_t mesh__TranslateY_nor[] = {0, -32767, 0, -32767, 0, -32767, 0, -32767, -32767, 0, -32767, 0, -32767, 0, -32767, 0,
|
||||
0, 32767, 0, 32767, 0, 32767, 0, 32767, 32767, 0, 32767, 0, 32767, 0, 32767, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static uint32_t mesh__TranslateY_indices[] = {0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11,
|
||||
12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23};
|
||||
|
||||
static int16_t mesh__TranslateZ_pos[] = {-3276, -3276, 11796, 32767, 3276, -3276, 11796, 32767, 3276, 3276, 11796, 32767, -3276, 3276, 11796, 32767,
|
||||
-3276, 3276, 11796, 0, 3276, 3276, 11796, 0, 3276, 3276, -11796, 0, -3276, 3276, -11796, 0,
|
||||
-3276, 3276, -11796, -32767, 3276, 3276, -11796, -32767, 3276, -3276, -11796, -32767, -3276, -3276, -11796, -32767,
|
||||
-3276, -3276, -11796, 0, 3276, -3276, -11796, 0, 3276, -3276, 11796, 0, -3276, -3276, 11796, 0,
|
||||
-3276, 3276, 11796, 0, -3276, 3276, -11796, 0, -3276, -3276, -11796, 0, -3276, -3276, 11796, 0,
|
||||
3276, 3276, -11796, 0, 3276, 3276, 11796, 0, 3276, -3276, 11796, 0, 3276, -3276, -11796, 0};
|
||||
static int16_t mesh__TranslateZ_nor[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 32767, 0, 32767, 0, 32767,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, -32767, 0, -32767, 0, -32767, 0, -32767,
|
||||
-32767, 0, -32767, 0, -32767, 0, -32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767, 0};
|
||||
static int16_t mesh__TranslateZ_pos[] = {-3276, -3276, 11796, 32767, 3276, -3276, 11796, 32767, 3276, 3276, 11796, 32767, -3276, 3276, 11796, 32767,
|
||||
-3276, 3276, 11796, 0, 3276, 3276, 11796, 0, 3276, 3276, -11796, 0, -3276, 3276, -11796, 0,
|
||||
-3276, 3276, -11796, -32767, 3276, 3276, -11796, -32767, 3276, -3276, -11796, -32767, -3276, -3276, -11796, -32767,
|
||||
-3276, -3276, -11796, 0, 3276, -3276, -11796, 0, 3276, -3276, 11796, 0, -3276, -3276, 11796, 0,
|
||||
-3276, 3276, 11796, 0, -3276, 3276, -11796, 0, -3276, -3276, -11796, 0, -3276, -3276, 11796, 0,
|
||||
3276, 3276, -11796, 0, 3276, 3276, 11796, 0, 3276, -3276, 11796, 0, 3276, -3276, -11796, 0};
|
||||
static int16_t mesh__TranslateZ_nor[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, 32767, 0, 32767, 0, 32767,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, -32767, 0, -32767, 0, -32767, 0, -32767,
|
||||
-32767, 0, -32767, 0, -32767, 0, -32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767, 0};
|
||||
static uint32_t mesh__TranslateZ_indices[] = {0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11,
|
||||
12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23};
|
||||
|
||||
|
||||
@@ -308,11 +308,11 @@ vec4_t uniforms_ext_vec4_link(object_t *object, material_data_t *mat, char *link
|
||||
|
||||
mat4_t uniforms_ext_mat4_link(object_t *object, material_data_t *mat, char *link) {
|
||||
if (string_equals(link, "_decal_layer_matrix")) { // Decal layer
|
||||
mat4_t m = mat4_inv(g_context->layer->decal_mat);
|
||||
f32 parent_scale = object->parent != NULL ? object->parent->transform->scale.x : 1.0;
|
||||
f32 f = parent_scale * object->transform->scale_world;
|
||||
m = mat4_scale(m, (vec4_t){f, f, f, 1.0});
|
||||
m = mat4_mult_mat(m, uniforms_ext_ortho_p);
|
||||
mat4_t m = mat4_inv(g_context->layer->decal_mat);
|
||||
f32 parent_scale = object->parent != NULL ? object->parent->transform->scale.x : 1.0;
|
||||
f32 f = parent_scale * object->transform->scale_world;
|
||||
m = mat4_scale(m, (vec4_t){f, f, f, 1.0});
|
||||
m = mat4_mult_mat(m, uniforms_ext_ortho_p);
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user