i’ve written a grass geometry shader and I wonder why my framerate dropped to 30 fps. The CPU does absolutely nothing but displaying one plane and moves the camera. All grass is created in shader. I dont know why but the cpu main takes 26 ms to complete while the render thread does only 0.3. Any ideas what the reason could be?
The “render thread” stat is still the CPU, not the GPU. That 0.3ms is the time the CPU is taking to tell the GPU what to render, and not the time the GPU is actually taking to render. You’ll want to use the profiler to check what’s taking so long. Most likely you’ll see a “Gfx.WaitForPresen” taking the most time on the CPU. That’s the CPU stalling because it’s waiting for the GPU to finish rendering the previous frame.