0

Main thread usage caused by a Shader Forge shader?

8bit4life 9 years ago 0
Hi,
When I'm using the built-in diffuse shader on a procedural mesh, my main thread uses ~3.2ms. When I switch to a custom shader I created (unity free, shader forge), my main thread uses ~6ms. I thought shaders are entirely executed by the GPU therefore I didn't expect my main thread spend more time when using a more complex shader.
My custom shader only has two tiny 32x32 pixel textures as parameters and a float slider. The internal structure is quite complex, but I expected that it can't have any effect outside of the GPU.
Can someone please point out how can this happen and what should I avoid doing in a shader in order to preserve low main thread CPU usage?
Thank you, 8bit4life