mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Vulkan: Use geo clip distance only where supported.
It might be supported without cull or GS. Otherwise we may need to clip the triangles manually.
This commit is contained in:
1 parent
2ce0cda333
commit
36eb0d9ad5
1 file changed
+3
-2
@@ -114,8 +114,9 @@ bool GenerateGeometryShader(const GShaderID &id, char *buffer, const ShaderLangu
|
||||
p.C(" vec3 projPos = outPos.xyz / outPos.w;\n");
|
||||
p.C(" float projZ = (projPos.z - u_depthRange.z) * u_depthRange.w;\n");
|
||||
// TODO: Not rectangles...
|
||||
// TODO: Check feature flag.
|
||||
//p.F(" gl_ClipDistance%s = projZ * outPos.w + outPos.w;\n", clip0);
|
||||
if (gstate_c.Supports(GPU_SUPPORTS_CLIP_DISTANCE)) {
|
||||
p.F(" gl_ClipDistance%s = projZ * outPos.w + outPos.w;\n", clip0);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < varyings.size(); i++) {
|
||||
VaryingDef &in = varyings[i];
|
||||
|
||||
Reference in new issue
Block a user