Compute Shader Warnings

This may not be HDRP related, as I don’t know what’s causing them. I am getting these warnings, but Unity is not giving me any clue about what cause them:

advice?

We are using Compute Shaders in our project and doing quite a lot of math operations. A warning is always generated :

“Shader warning in ‘VertexGenerator.compute’: integer divides may be much slower, try using uints if possible”

We need to use integers and not uints. Is there a way to disable these kind of warnings ? (we have 74 of them each time we change the shader so it’s a bit annoying).

I think you assigned the stride of the buffer wrong. To prevent error, I always use sizeof().

1 Like

It may be in a plugin and not directly my code, so my issue is how do I find the actual culprit?

Ahh I misunderstood the problem.
I cannot think of any solutions other than searching .compute in the project tab and going through each computebuffer.

By the way, this happens very early in the execution of the game. It’s much earlier than any execution of my code, so I can also suspect it may be some unity HDRP related problem. I have also seen bug reports related to this. This is the complete log:

As you can guess from the log it happens very early, the entry point of my code is not even called at this point yet