Unity Shadergraph Tutorial - Custom Shadergraph Loop Node

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 9

  • @BinaryImpact
    @BinaryImpact  5 лет назад +1

    This video sadly only works in #unity 2018.3.
    To not leave the 2019.1 users hanging we created another short video that directly builds on the last one (so watch that first 🙂): ruclips.net/video/8rf0SlbJhcQ/видео.html

  • @AndyBakerUK
    @AndyBakerUK 5 лет назад +1

    In the 80's I used to spend hours typing in code from listing magazines. Some magazines came with cassettes taped to the front so that I didn't have to type the code in any more. Then the internet was invented and you could download the code that went with tutorials. :-) How about posting the code? My teachers at school tried to convince me I'd learn more by copying out passages from textbooks but I didn't believe them then and I'm still not convinced it helps!

    • @BinaryImpact
      @BinaryImpact  5 лет назад +2

      Write shadercode:
      float4 result = float4(1,1,1,1);
      float bw = 0;
      float totaloffset = 0;
      for ( int i = 0; i < Iterations; ++i ) {
      totaloffset += ParallaxOffset;
      float2 offset = float2((ViewDirection * totaloffset).r, (ViewDirection * totaloffset).g);
      bw = SAMPLE_TEXTURE2D(Mask, SS, (UV + offset)).r;
      result *= clamp(bw + (i/Iterations), 0, 1);
      }
      result.a = 1;
      Out = result;

  • @BinaryImpact
    @BinaryImpact  5 лет назад

    Unity version for the tutorial has to be 2018.3. due to changes in the 2019.1. version.
    We are working on a 2019.1. solution!

  • @joshhoare9764
    @joshhoare9764 4 года назад

    is inaccessible due to its protection level
    :/ i can't find solutions that make sense.

    • @BinaryImpact
      @BinaryImpact  4 года назад

      This video sadly only works in #unity 2018.3.
      If you are on a newer Version take a look at this video because they changed how that works: ruclips.net/video/8rf0SlbJhcQ/видео.html

  • @lupinder2058
    @lupinder2058 4 года назад

    how can ı optimize a loop system to my script ? After ı clicked button ı can disable my button and after 7 seconds ı can get it back button to game but that functions happen only once. How can script can work all time. Thanks for help. This is very important for me.
    public class Cooldown : MonoBehaviour
    {
    float timer = 0;
    public GameObject Enable_Disable;
    public void Enable()
    {
    Enable_Disable.SetActive(true);
    }
    public void Disable()
    {
    Enable_Disable.SetActive(false);
    }
    void Update()
    {
    timer = timer + Time.deltaTime;
    if (timer > 7)
    {
    Enable_Disable.SetActive(true);
    }

    • @BinaryImpact
      @BinaryImpact  4 года назад

      You need to reset your timer.

    • @lupinder2058
      @lupinder2058 4 года назад

      @@BinaryImpact How can ı do that ?