setDepthClamp.lua 943 B

12345678910111213141516171819202122232425262728293031323334
  1. return {
  2. tag = 'pipeline',
  3. summary = 'Enable or disable depth clamp.',
  4. description = [[
  5. Enables or disables depth clamp. Normally, when pixels fall outside of the clipping planes,
  6. they are clipped (not rendered). Depth clamp will instead render these pixels, clamping their
  7. depth on to the clipping planes.
  8. ]],
  9. arguments = {
  10. enable = {
  11. type = 'boolean',
  12. description = 'Whether depth clamp should be enabled.'
  13. }
  14. },
  15. returns = {},
  16. variants = {
  17. {
  18. arguments = { 'enable' },
  19. returns = {}
  20. }
  21. },
  22. notes = [[
  23. This isn\'t supported on all GPUs. Use the `depthClamp` feature of `lovr.graphics.getFeatures`
  24. to check for support. If depth clamp is enabled when unsupported, it will silently fall back to
  25. depth clipping.
  26. Depth clamping is not enabled by default.
  27. ]],
  28. related = {
  29. 'Pass:setDepthTest',
  30. 'Pass:setDepthWrite',
  31. 'Pass:setDepthOffset'
  32. }
  33. }