OpenXR - Disable range culling properly

This commit is contained in:
Lubos committed 2022-11-07 22:10:12 +01:00
1 parent eec414d331
commit d1dabd40ee
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1302,7 +1302,7 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag
WRITE(p, " }\n");
}
if (vertexRangeCulling && !gstate_c.Use(GPU_USE_VIRTUAL_REALITY)) {
if (vertexRangeCulling) {
WRITE(p, " vec3 projPos = outPos.xyz / outPos.w;\n");
WRITE(p, " float projZ = (projPos.z - u_depthRange.z) * u_depthRange.w;\n");
+1 -1
View File
@@ -3338,7 +3338,7 @@ u32 GPUCommon::CheckGPUFeatures() const {
bool canClipOrCull = draw_->GetDeviceCaps().clipDistanceSupported || draw_->GetDeviceCaps().cullDistanceSupported;
bool canDiscardVertex = draw_->GetBugs().Has(Draw::Bugs::BROKEN_NAN_IN_CONDITIONAL);
if (canClipOrCull || canDiscardVertex) {
if (!gstate_c.Use(GPU_USE_VIRTUAL_REALITY) &&(canClipOrCull || canDiscardVertex)) {
// We'll dynamically use the parts that are supported, to reduce artifacts as much as possible.
features |= GPU_USE_VS_RANGE_CULLING;
}