getCompareMode.lua 900 B

1234567891011121314151617181920212223242526272829
  1. return {
  2. summary = 'Get the compare mode of the Sampler.',
  3. description = [[
  4. Returns the compare mode of the Sampler. This is a feature typically only used for shadow
  5. mapping. Using a sampler with a compare mode requires it to be declared in a shader as a
  6. `samplerShadow` instead of a `sampler` variable, and used with a texture that has a depth
  7. format. The result of sampling a depth texture with a shadow sampler is a number between 0 and
  8. 1, indicating the percentage of sampled pixels that passed the comparison.
  9. ]],
  10. arguments = {},
  11. returns = {
  12. compare = {
  13. type = 'CompareMode',
  14. description = 'The compare mode of the sampler.'
  15. }
  16. },
  17. variants = {
  18. {
  19. arguments = {},
  20. returns = { 'compare' }
  21. }
  22. },
  23. related = {
  24. 'Sampler:getFilter',
  25. 'Sampler:getWrap',
  26. 'Sampler:getAnisotropy',
  27. 'Sampler:getMipmapRange'
  28. }
  29. }