Is the result of e.g. a Hue Shift node of a dynamic material instance that was applied to a “constant” texture stored / cached and reused the next frame without any additional calculation ?
Or is the Hue Shift node recalculated each and every frame reguardless of if something ( like the Hue Shift Percentage ) has changed or not ?
Hmm…I’m not sure how the material graph nodes work, but I would assume they recalculate every frame just because there are moving materials and such. And, GPU stuff is usually frame.
The result of for example a hue shift material node with a constant percentage input value in a dynamic material instance is cached to reuse the calculation result in the next frame if the input values do not change. This is known as Material Instance Constant (MIC) caching.
When a dynamic material instance is created, the material graph is compiled into a series of shader instructions that run on the GPU. When the input values of the material instance are changed, the shader instructions are re-executed to calculate the new output values. However, if the input values remain the same between frames, the cached result from the previous frame is used instead of re-executing the shader instructions.
MIC caching can significantly improve the performance of materials that have expensive calculations or large numbers of nodes. It can also help reduce GPU memory usage by minimizing the number of shader instructions that need to be stored in memory.
Note that not all material nodes are eligible for MIC caching. For example, nodes that rely on time or other dynamic inputs cannot be cached. Additionally, certain material settings or features may affect the caching behavior of a material instance, so it’s important to test and profile your materials to ensure optimal performance.