krom -> iron

This commit is contained in:
luboslenco
2024-09-03 16:39:16 +02:00
parent 6e8d8959f1
commit f60944ed21
90 changed files with 485 additions and 485 deletions
+1 -1
View File
@@ -94,5 +94,5 @@ function export_obj_run(path: string, paint_objects: mesh_object_t[], apply_disp
path += ".obj";
}
krom_file_save_bytes(path, o, 0);
iron_file_save_bytes(path, o, 0);
}
+1 -1
View File
@@ -33,7 +33,7 @@ function import_mesh_run(path: string, _clear_layers: bool = true, replace_exist
project_mesh_assets = [path];
///if (krom_android || krom_ios)
///if (iron_android || iron_ios)
sys_title_set(substring(path, string_last_index_of(path, path_sep) + 1, string_last_index_of(path, ".")));
///end
}
+2 -2
View File
@@ -4,7 +4,7 @@ function make_brush_run(vert: node_shader_t, frag: node_shader_t) {
node_shader_write(frag, "float dist = 0.0;");
if (config_raw.brush_3d) {
///if (krom_direct3d11 || krom_direct3d12 || krom_metal || krom_vulkan)
///if (iron_direct3d11 || iron_direct3d12 || iron_metal || iron_vulkan)
node_shader_write(frag, "float depth = textureLod(gbufferD, inp.xy, 0.0).r;");
///else
node_shader_write(frag, "float depth = textureLod(gbufferD, vec2(inp.x, 1.0 - inp.y), 0.0).r;");
@@ -19,7 +19,7 @@ function make_brush_run(vert: node_shader_t, frag: node_shader_t) {
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 (krom_direct3d11 || krom_direct3d12 || krom_metal || krom_vulkan)
///if (iron_direct3d11 || iron_direct3d12 || iron_metal || iron_vulkan)
node_shader_write(frag, "float depthlast = textureLod(gbufferD, inplast.xy, 0.0).r;");
///else
node_shader_write(frag, "float depthlast = textureLod(gbufferD, vec2(inplast.x, 1.0 - inplast.y), 0.0).r;");
+3 -3
View File
@@ -75,7 +75,7 @@ function make_mesh_run(data: material_t, layer_pass: i32 = 0): node_shader_conte
node_shader_add_uniform(frag, "sampler2D gbuffer1");
node_shader_add_uniform(frag, "sampler2D gbuffer2");
node_shader_write(frag, "vec2 fragcoord = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;");
///if (krom_direct3d11 || krom_direct3d12 || krom_metal || krom_vulkan)
///if (iron_direct3d11 || iron_direct3d12 || iron_metal || iron_vulkan)
node_shader_write(frag, "fragcoord.y = 1.0 - fragcoord.y;");
///end
node_shader_write(frag, "vec4 gbuffer0_sample = textureLod(gbuffer0, fragcoord, 0.0);");
@@ -253,7 +253,7 @@ function make_mesh_run(data: material_t, layer_pass: i32 = 0): node_shader_conte
}
frag.vvec = true;
///if (krom_direct3d11 || krom_direct3d12 || krom_metal || krom_vulkan)
///if (iron_direct3d11 || iron_direct3d12 || iron_metal || iron_vulkan)
node_shader_write(frag, "mat3 TBN = cotangent_frame(n, vvec, tex_coord);");
///else
node_shader_write(frag, "mat3 TBN = cotangent_frame(n, -vvec, tex_coord);");
@@ -358,7 +358,7 @@ function make_mesh_run(data: material_t, layer_pass: i32 = 0): node_shader_conte
}
function make_mesh_get_max_textures(): i32 {
///if krom_direct3d11
///if iron_direct3d11
return 128 - 66;
///else
return 16 - 3; // G4onG5/G4.c.h MAX_TEXTURES
+1 -1
View File
@@ -137,7 +137,7 @@ function make_mesh_preview_run(data: material_t, matcon: material_context_t): no
}
else {
frag.vvec = true;
///if (krom_direct3d11 || krom_direct3d12 || krom_metal || krom_vulkan)
///if (iron_direct3d11 || iron_direct3d12 || iron_metal || iron_vulkan)
node_shader_write(frag, "mat3 TBN = cotangent_frame(n, vvec, tex_coord);");
///else
node_shader_write(frag, "mat3 TBN = cotangent_frame(n, -vvec, tex_coord);");
+1 -1
View File
@@ -38,7 +38,7 @@ function make_sculpt_run(data: material_t, matcon: material_context_t): node_sha
node_shader_add_out(vert, "vec2 tex_coord");
node_shader_write(vert, "const vec2 madd = vec2(0.5, 0.5);");
node_shader_write(vert, "tex_coord = pos.xy * madd + madd;");
///if (krom_direct3d11 || krom_direct3d12 || krom_metal || krom_vulkan)
///if (iron_direct3d11 || iron_direct3d12 || iron_metal || iron_vulkan)
node_shader_write(vert, "tex_coord.y = 1.0 - tex_coord.y;");
///end
node_shader_write(vert, "gl_Position = vec4(pos.xy, 0.0, 1.0);");