paint: merge gc remove
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
#include "../global.h"
|
||||
|
||||
char *camera_texture_node_vector(ui_node_t *node, ui_node_socket_t *socket) {
|
||||
char *tex_name = string("texcamera_%s", parser_material_node_name(node, NULL));
|
||||
char *tex_name = string_tmp("texcamera_%s", parser_material_node_name(node, NULL));
|
||||
node_shader_add_texture(parser_material_kong, tex_name, "_camera_texture");
|
||||
char *store = parser_material_store_var_name(node);
|
||||
parser_material_write(parser_material_kong, string("var %s_res: float3 = sample(%s, sampler_linear, tex_coord).rgb;", store, tex_name));
|
||||
return string("%s_res", store);
|
||||
parser_material_write(parser_material_kong, string_tmp("var %s_res: float3 = sample(%s, sampler_linear, tex_coord).rgb;", store, tex_name));
|
||||
return string_tmp("%s_res", store);
|
||||
}
|
||||
|
||||
void camera_texture_node_init() {
|
||||
|
||||
ui_node_t *camera_texture_node_def =
|
||||
GC_ALLOC_INIT(ui_node_t, {.id = 0,
|
||||
ALLOC_INIT(ui_node_t, {.id = 0,
|
||||
.name = _tr("Camera Texture"),
|
||||
.type = "TEX_CAMERA", // extension
|
||||
.x = 0,
|
||||
@@ -21,7 +21,7 @@ void camera_texture_node_init() {
|
||||
.inputs = any_array_create_from_raw((void *[]){}, 0),
|
||||
.outputs = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Color"),
|
||||
.type = "RGBA",
|
||||
|
||||
Reference in New Issue
Block a user