krom -> iron
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);");
|
||||
|
||||
@@ -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);");
|
||||
|
||||
Reference in New Issue
Block a user