This commit is contained in:
luboslenco
2025-02-11 10:51:57 +01:00
parent 9e38ba8e51
commit bf450eaa49
58 changed files with 266 additions and 557 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ function import_envmap_run(path: string, image: image_t) {
import_envmap_pipeline.fragment_shader = sys_get_shader("prefilter_envmap.frag");
let vs: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
import_envmap_pipeline.input_layout = [vs];
import_envmap_pipeline.input_layout = vs;
import_envmap_pipeline.color_attachment_count = 1;
import_envmap_pipeline.color_attachments[0] = tex_format_t.RGBA128;
g4_pipeline_compile(import_envmap_pipeline);
+2 -2
View File
@@ -43,7 +43,7 @@ function line_draw_init() {
let structure: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(structure, "pos", vertex_data_t.F32_3X);
line_draw_pipeline = g4_pipeline_create();
line_draw_pipeline.input_layout = [structure];
line_draw_pipeline.input_layout = structure;
line_draw_pipeline.fragment_shader = sys_get_shader("line.frag");
line_draw_pipeline.vertex_shader = sys_get_shader("line.vert");
line_draw_pipeline.depth_write = true;
@@ -65,7 +65,7 @@ function line_draw_init() {
let structure: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(structure, "pos", vertex_data_t.F32_3X);
line_draw_overlay_pipeline = g4_pipeline_create();
line_draw_overlay_pipeline.input_layout = [structure];
line_draw_overlay_pipeline.input_layout = structure;
line_draw_overlay_pipeline.fragment_shader = sys_get_shader("line_overlay.frag");
line_draw_overlay_pipeline.vertex_shader = sys_get_shader("line.vert");
line_draw_overlay_pipeline.depth_write = true;
+15 -15
View File
@@ -55,7 +55,7 @@ function _pipes_make_merge(red: bool, green: bool, blue: bool, alpha: bool): pip
pipe.fragment_shader = sys_get_shader("layer_merge.frag");
let vs: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
pipe.input_layout = [vs];
pipe.input_layout = vs;
pipe.color_write_masks_red = [red];
pipe.color_write_masks_green = [green];
pipe.color_write_masks_blue = [blue];
@@ -86,7 +86,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_copy.input_layout = [vs];
pipes_copy.input_layout = vs;
g4_pipeline_compile(pipes_copy);
}
@@ -98,7 +98,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_copy_bgra.input_layout = [vs];
pipes_copy_bgra.input_layout = vs;
g4_pipeline_compile(pipes_copy_bgra);
}
@@ -110,7 +110,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_copy8.input_layout = [vs];
pipes_copy8.input_layout = vs;
pipes_copy8.color_attachment_count = 1;
pipes_copy8.color_attachments[0] = tex_format_t.R8;
g4_pipeline_compile(pipes_copy8);
@@ -124,7 +124,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_copy128.input_layout = [vs];
pipes_copy128.input_layout = vs;
pipes_copy128.color_attachment_count = 1;
pipes_copy128.color_attachments[0] = tex_format_t.RGBA128;
g4_pipeline_compile(pipes_copy128);
@@ -139,7 +139,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_invert8.input_layout = [vs];
pipes_invert8.input_layout = vs;
pipes_invert8.color_attachment_count = 1;
pipes_invert8.color_attachments[0] = tex_format_t.R8;
g4_pipeline_compile(pipes_invert8);
@@ -151,7 +151,7 @@ function pipes_init() {
pipes_apply_mask.fragment_shader = sys_get_shader("mask_apply.frag");
let vs: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
pipes_apply_mask.input_layout = [vs];
pipes_apply_mask.input_layout = vs;
g4_pipeline_compile(pipes_apply_mask);
pipes_tex0_mask = g4_pipeline_get_tex_unit(pipes_apply_mask, "tex0");
pipes_texa_mask = g4_pipeline_get_tex_unit(pipes_apply_mask, "texa");
@@ -163,7 +163,7 @@ function pipes_init() {
pipes_merge_mask.fragment_shader = sys_get_shader("mask_merge.frag");
let vs: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
pipes_merge_mask.input_layout = [vs];
pipes_merge_mask.input_layout = vs;
g4_pipeline_compile(pipes_merge_mask);
pipes_tex0_merge_mask = g4_pipeline_get_tex_unit(pipes_merge_mask, "tex0");
pipes_texa_merge_mask = g4_pipeline_get_tex_unit(pipes_merge_mask, "texa");
@@ -177,7 +177,7 @@ function pipes_init() {
pipes_colorid_to_mask.fragment_shader = sys_get_shader("mask_colorid.frag");
let vs: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
pipes_colorid_to_mask.input_layout = [vs];
pipes_colorid_to_mask.input_layout = vs;
g4_pipeline_compile(pipes_colorid_to_mask);
pipes_texpaint_colorid = g4_pipeline_get_tex_unit(pipes_colorid_to_mask, "texpaint_colorid");
pipes_tex_colorid = g4_pipeline_get_tex_unit(pipes_colorid_to_mask, "texcolorid");
@@ -193,7 +193,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_copy_r.input_layout = [vs];
pipes_copy_r.input_layout = vs;
pipes_copy_r.color_write_masks_green = [false];
pipes_copy_r.color_write_masks_blue = [false];
pipes_copy_r.color_write_masks_alpha = [false];
@@ -208,7 +208,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_copy_g.input_layout = [vs];
pipes_copy_g.input_layout = vs;
pipes_copy_g.color_write_masks_red = [false];
pipes_copy_g.color_write_masks_blue = [false];
pipes_copy_g.color_write_masks_alpha = [false];
@@ -221,7 +221,7 @@ function pipes_init() {
pipes_inpaint_preview.fragment_shader = sys_get_shader("inpaint_preview.frag");
let vs: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
pipes_inpaint_preview.input_layout = [vs];
pipes_inpaint_preview.input_layout = vs;
g4_pipeline_compile(pipes_inpaint_preview);
pipes_tex0_inpaint_preview = g4_pipeline_get_tex_unit(pipes_inpaint_preview, "tex0");
pipes_texa_inpaint_preview = g4_pipeline_get_tex_unit(pipes_inpaint_preview, "texa");
@@ -233,7 +233,7 @@ function pipes_init() {
pipes_copy_a.fragment_shader = sys_get_shader("layer_copy_rrrr.frag");
let vs: vertex_struct_t = g4_vertex_struct_create();
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
pipes_copy_a.input_layout = [vs];
pipes_copy_a.input_layout = vs;
pipes_copy_a.color_write_masks_red = [false];
pipes_copy_a.color_write_masks_green = [false];
pipes_copy_a.color_write_masks_blue = [false];
@@ -250,7 +250,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
pipes_copy_rgb.input_layout = [vs];
pipes_copy_rgb.input_layout = vs;
pipes_copy_rgb.color_write_masks_alpha = [false];
g4_pipeline_compile(pipes_copy_rgb);
}
@@ -267,7 +267,7 @@ function pipes_init() {
g4_vertex_struct_add(vs, "nor", vertex_data_t.I16_2X_NORM);
g4_vertex_struct_add(vs, "tex", vertex_data_t.I16_2X_NORM);
///end
pipes_cursor.input_layout = [vs];
pipes_cursor.input_layout = vs;
pipes_cursor.blend_source = blend_factor_t.SOURCE_ALPHA;
pipes_cursor.blend_dest = blend_factor_t.INV_SOURCE_ALPHA;
pipes_cursor.depth_write = false;
+1 -1
View File
@@ -39,7 +39,7 @@ function ui_view2d_init() {
g4_vertex_struct_add(vs, "pos", vertex_data_t.F32_3X);
g4_vertex_struct_add(vs, "tex", vertex_data_t.F32_2X);
g4_vertex_struct_add(vs, "col", vertex_data_t.U8_4X_NORM);
ui_view2d_pipe.input_layout = [vs];
ui_view2d_pipe.input_layout = vs;
ui_view2d_pipe.blend_source = blend_factor_t.BLEND_ONE;
ui_view2d_pipe.blend_dest = blend_factor_t.BLEND_ZERO;
ui_view2d_pipe.color_write_masks_alpha[0] = false;
-2
View File
@@ -96,8 +96,6 @@ function util_encode_mesh_datas(datas: mesh_data_t[]) {
armpack_encode_f32(datas[i].scale_pos);
armpack_encode_string("scale_tex");
armpack_encode_f32(datas[i].scale_tex);
armpack_encode_string("instancing");
armpack_encode_null(); // mesh_data_instancing_t
armpack_encode_string("skin");
armpack_encode_null(); // skin_t
armpack_encode_string("vertex_arrays");
+1 -1
View File
@@ -117,7 +117,7 @@ function util_uv_cache_dilate_map() {
g4_vertex_struct_add(vs, "nor", vertex_data_t.I16_2X_NORM);
g4_vertex_struct_add(vs, "tex", vertex_data_t.I16_2X_NORM);
///end
util_uv_pipe_dilate.input_layout = [vs];
util_uv_pipe_dilate.input_layout = vs;
util_uv_pipe_dilate.depth_write = false;
util_uv_pipe_dilate.depth_mode = compare_mode_t.ALWAYS;
util_uv_pipe_dilate.color_attachments[0] = tex_format_t.R8;