diff --git a/rpcs3/Emu/RSX/Program/GLSLCommon.cpp b/rpcs3/Emu/RSX/Program/GLSLCommon.cpp index 6d4dcffef0..0ae8ab8993 100644 --- a/rpcs3/Emu/RSX/Program/GLSLCommon.cpp +++ b/rpcs3/Emu/RSX/Program/GLSLCommon.cpp @@ -177,11 +177,11 @@ namespace glsl enabled_options.push_back("_ENABLE_LIT_EMULATION"); } - if (props.require_clip_functions) + if (props.require_clip_plane_functions) { OS << "#define CLIP_PLANE_DISABLED 1\n" - "#define is_user_clip_enabled(idx) (_get_bits(get_user_clip_config(), idx * 2, 2) == CLIP_PLANE_DISABLED)\n" + "#define is_user_clip_enabled(idx) (_get_bits(get_user_clip_config(), idx * 2, 2) != CLIP_PLANE_DISABLED)\n" "#define user_clip_factor(idx) float(_get_bits(get_user_clip_config(), idx * 2, 2) - 1)\n\n"; } diff --git a/rpcs3/Emu/RSX/Program/GLSLTypes.h b/rpcs3/Emu/RSX/Program/GLSLTypes.h index 2e5fd49cd7..4716c845d2 100644 --- a/rpcs3/Emu/RSX/Program/GLSLTypes.h +++ b/rpcs3/Emu/RSX/Program/GLSLTypes.h @@ -26,7 +26,7 @@ namespace glsl bool require_lit_emulation : 1; bool require_explicit_invariance : 1; bool require_instanced_render : 1; - bool require_clip_functions : 1; + bool require_clip_plane_functions : 1; bool emulate_zclip_transform : 1; bool emulate_depth_clip_only : 1; diff --git a/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp b/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp index 907f5b2d9c..06ab05e226 100644 --- a/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp +++ b/rpcs3/Emu/RSX/VK/VKShaderInterpreter.cpp @@ -63,7 +63,7 @@ namespace vk ::glsl::shader_properties properties{}; properties.domain = ::glsl::program_domain::glsl_vertex_program; properties.require_lit_emulation = true; - properties.require_clip_functions = true; + properties.require_clip_plane_functions = true; RSXVertexProgram null_prog; std::string shader_str; diff --git a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp index ddf8bd7ae5..375d35e942 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp @@ -334,7 +334,7 @@ void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS) glsl::shader_properties properties2{}; properties2.domain = glsl::glsl_vertex_program; properties2.require_lit_emulation = properties.has_lit_op; - properties2.require_clip_functions = true; + properties2.require_clip_plane_functions = true; properties2.emulate_zclip_transform = true; properties2.emulate_depth_clip_only = vk::g_render_device->get_shader_types_support().allow_float64; properties2.low_precision_tests = vk::is_NVIDIA(vk::get_driver_vendor());