Skip to content

Commit

Permalink
Metal fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Sep 16, 2024
1 parent b4ffc80 commit 8947a4e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
6 changes: 1 addition & 5 deletions base/sources/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ type context_t = {
///if (arm_direct3d12 || arm_vulkan || arm_metal)
pathtrace_mode?: path_trace_mode_t;
///end
///if (arm_direct3d12 || arm_vulkan) // || arm_metal)
viewport_mode?: viewport_mode_t;
///else
viewport_mode?: viewport_mode_t;
///end
///if (arm_android || arm_ios)
render_mode?: render_mode_t;
///else
Expand Down Expand Up @@ -334,7 +330,7 @@ function context_create(): context_t {
///if (arm_direct3d12 || arm_vulkan || arm_metal)
c.pathtrace_mode = path_trace_mode_t.CORE;
///end
///if (arm_direct3d12 || arm_vulkan) // || arm_metal)
///if (arm_direct3d12 || arm_vulkan)
c.viewport_mode = viewport_mode_t.PATH_TRACE;
///else
c.viewport_mode = viewport_mode_t.LIT;
Expand Down
16 changes: 8 additions & 8 deletions base/sources/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ enum viewport_mode_t {
METALLIC = 5,
OPACITY = 6,
HEIGHT = 7,
PATH_TRACE = 8,
EMISSION = 9,
SUBSURFACE = 10,
TEXCOORD = 11,
OBJECT_NORMAL = 12,
MATERIAL_ID = 13,
OBJECT_ID = 14,
MASK = 15,
EMISSION = 8,
SUBSURFACE = 9,
TEXCOORD = 10,
OBJECT_NORMAL = 11,
MATERIAL_ID = 12,
OBJECT_ID = 13,
MASK = 14,
PATH_TRACE = 15,
}

enum channel_type_t {
Expand Down
2 changes: 1 addition & 1 deletion base/sources/render_path_deferred.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function render_path_deferred_init() {
t.name = "buf";
t.width = 0;
t.height = 0;
///if (arm_direct3d12 || arm_vulkan)// || arm_metal)
///if (arm_direct3d12 || arm_vulkan)
// Match raytrace_target format
// Will cause "The render target format in slot 0 does not match that specified by the current pipeline state"
t.format = "RGBA64";
Expand Down

0 comments on commit 8947a4e

Please sign in to comment.