#More about compute shaders than Bevy,

3 messages · Page 1 of 1 (latest)

gleaming canopy
#

What is the way to output values from them? just using a read-write storage and each invocation writes to other segment of it? also, about the builtin inputs for copute shaders, while there is local_invocation_index, I cant find anything about global index, so how can I (with varying dispatch dimensions) map each invocation to an output 'index'?

analog phoenix
#

There's a 3d global_invocation_id, and then you can map that to a 1d index yourself easily enough

#

As for outputting values, it depends what you want to use them for. What is your compute shader doing?