Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Stress on GPU if I change the texture value of material every frame

Discussion in 'General Graphics' started by marchall_box, Dec 10, 2020.

  1. marchall_box

    marchall_box

    Joined:
    Mar 28, 2013
    Posts:
    139
    Hello,

    If I change a texture on the material every frame, how would that be stressful?


    Code (CSharp):
    1. void Update()
    2. {
    3.     meshRenderer.material.SetTexture("_MainTexture", texture[id] );
    4. }

    Each image is at a resolution of 256x256 - and 10-20kb size after Crunch Compression.

    I have around 20-30 objects that do these updates. All different unique materials/textures in a scene.

    Also, if the platforms were Nintendo Switch / modern PC / PS4, 5 - what will be expected stress for it?