Skip to content

indirect.pass

indirect.<pass> = <bufferObjectNumber> <offsetInBuffer>

Location: shaders.properties

Allows you to dispatch a compute shader with the work group amount specified from a SSBO.

To use this, replace:

  • <pass> with the name of the compute shader pass (e.g. composite, deferred1, prepare8)
  • <bufferObjectNumber> with the “index” of the SSBO
  • <offsetInBuffer> with the offset to the work group count in bytes

The object at offset in the SSBO must be an uvec3 which stores the number of work groups in each axis. If you do not do this, your PC will most likely crash trying to dispatch 2147483647^3 work groups. Don’t do that.