Search Issue Tracker

By Design

Votes

0

Found in [Package]

12.0.0

Issue ID

1311843

Regression

No

Unity CPU usage spikes to 30% when Time Node is connected to any other Node in ShaderGraph

Package: Shader Graph

-

How to reproduce:
1. Open the "ShaderGraphTime.zip" project
2. Open the "Time" Shader Graph in the Project window
3. Connect Time Node to Multiply Node in the Shader Graph window
4. Observe the CPU usage in Task Manager/Activity Monitor

Expected result: No spike in CPU usage
Actual result: 30% CPU usage spike

Reproducible with: 7.5.3 (2019.4.20f1), 10.2.2 (2020.2.5f1), 11.0.0 (2021.1.0b7), 12.0.0 (2021.2.0a5)

  1. Resolution Note:

    The time node causes the node previews to re-render every frame, which definitely costs a bit of CPU.

    I took a quick look at the profiler in 2021.2, and I didn't see anything unexpected in the costs.
    There are a few things we could probably optimize a bit more, and there are a few things on our backlog to address there, but I didn't see anything that would count as a bug.

    The rendering cost is proportional to the number of visible previews that are animated (connected to a time node upstream).
    You can hide all the previews to get rid of the cost.

    Definitely send it back to us if you can't get rid of the cost by hiding the previews, or if you can find evidence in the profiler that something bad is going on.

    Thanks!

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.