Search Unity

Question Speed are Difference?

Discussion in 'Shader Graph' started by Rachan, Mar 22, 2023.

  1. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    Hi there!

    I working on 2D Sprite Shader graph for flowing a wind and sway a sprite
    But I found that Why some objects are moving so slow
    and some objects are moving very faster?

    it depending on what?

    Thanks!!!
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    Because of logic in your shader.
    Most likely an error on your part.

    But withouth showing your shader, no one will be able to guess and give you right answer.
     
    Rachan and Qriva like this.
  3. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    Ok Thank you for your answer

    So I decided to use material per difference objects
    such as Tree 1 material and Grass 1 material or bush or other...
    my Shader was from this tutorial, everything are the same!


    But when it in my scene, some objects are stay But some objects are moving
    I don't know why...
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    Do you use same Unity and Shader Graph version as per tutorial?
    Does your objects having same texture?
    Do you have prefab object, instantiating copies of it into a scene?
     
  5. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    I'm not sure about Unity version But this can be a cause?
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    High chances are, it may be. But not guarantee.
    So please compare which Unity version you have and which is on the tutorial.
    When running any tutorial, make sure you have matching Unity versions.
    Same for any packages that are required.
     
    Rachan likes this.
  7. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    Ok I fixed by create a material for each object type
    such as Bush
    Tree
    Grass

    Bush for object that need to more moving
    Tree for object that move a little bit
    Grass for object that move very much in X axis

    this solution is Ok? a multiple materials for each types
    at first I thought it should be only one material and use all of type