Adjust clip-space for Metal
This commit is contained in:
Родитель
20d2b59c8d
Коммит
a496a40f98
|
@ -1176,9 +1176,10 @@ void CompilerMSL::emit_fixup()
|
|||
{
|
||||
if (options.vertex.fixup_clipspace)
|
||||
{
|
||||
const char *suffix = backend.float_literal_suffix ? "f" : "";
|
||||
/*const char *suffix = backend.float_literal_suffix ? "f" : "";
|
||||
statement(qual_pos_var_name, ".z = 2.0", suffix, " * ", qual_pos_var_name, ".z - ", qual_pos_var_name,
|
||||
".w;", " // Adjust clip-space for Metal");
|
||||
".w;", " // Adjust clip-space for Metal");*/
|
||||
statement(qual_pos_var_name, ".z = (", qual_pos_var_name, ".z + ", qual_pos_var_name, ".w) * 0.5; // Adjust clip-space for Metal");
|
||||
}
|
||||
|
||||
if (msl_config.flip_vert_y)
|
||||
|
|
|
@ -28,8 +28,8 @@ namespace spirv_cross
|
|||
struct MSLConfiguration
|
||||
{
|
||||
uint32_t vtx_attr_stage_in_binding = 0;
|
||||
bool flip_vert_y = true;
|
||||
bool flip_frag_y = true;
|
||||
bool flip_vert_y = false;
|
||||
bool flip_frag_y = false;
|
||||
bool is_rendering_points = false;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче