Godot Shader - Water Ripple Distortion

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 17

  • @NevoskiStudios
    @NevoskiStudios  2 ปีที่แล้ว +2

    I meant to add, if you're importing a noise texture you made in Gimp, make sure "Repeat" is enabled in the Godot import settings.

    • @erich_l4644
      @erich_l4644 ปีที่แล้ว +1

      this is something you'd need to check Gimp or otherwise

  • @sal1554
    @sal1554 4 หลายเดือนก่อน +3

    Thank you so much for the tutorial!
    For those who face an error for SCREEN_TEXTURE here is the solution, just add this line of code in the above and everything should working
    uniform sampler2D SCREEN_TEXTURE: hint_screen_texture, filter_linear_mipmap;
    And here is the full code in case anyone need it
    shader_type canvas_item;
    uniform sampler2D SCREEN_TEXTURE: hint_screen_texture, filter_linear_mipmap;
    uniform sampler2D noise: repeat_enable, filter_nearest;
    uniform float speed : hint_range(0.05, 0.5) = 0.1;
    uniform float strength : hint_range(0.005, 0.5) = 0.1;
    void fragment() {
    float noise_value = texture(noise,UV + TIME * speed).r;

    COLOR = texture(SCREEN_TEXTURE, SCREEN_UV - (strength / 2.0) + vec2(noise_value) * strength);
    }

  • @sabbers11
    @sabbers11 3 หลายเดือนก่อน +1

    Great tutorial, but do you know how to make it pixel perfect so it doesn't smudge? I am trying to make an effect similar to the SNES Donkey Kong Country water levels.

  • @murrrr8288
    @murrrr8288 2 หลายเดือนก่อน

    Great video :)

  • @madcativ
    @madcativ ปีที่แล้ว

    Thank you for this video, it helped me a lot!, well explained!

  • @ViniCavin
    @ViniCavin 2 ปีที่แล้ว

    This is awesome! You’re very good at explaining things :) thanks!

  • @H0lley
    @H0lley 2 ปีที่แล้ว +2

    cool scene in the beginning. I'm curious how did you do the reflection?
    is it screen reading or is it essentially a flipped copy of the player node?

    • @NevoskiStudios
      @NevoskiStudios  2 ปีที่แล้ว +1

      A flipped copy of the player sprites!

  • @Filgaja
    @Filgaja 6 หลายเดือนก่อน

    damned i thought you would show ho to create the water rings while moving in water. Thats one of my problems at i cant go over with :)

    • @NevoskiStudios
      @NevoskiStudios  6 หลายเดือนก่อน +1

      It's just a Particles2D node that follows the players position using physics_process. It's emitting when the player is moving, not emitting when the player is still!

  • @cl2422
    @cl2422 6 หลายเดือนก่อน

    How would I apply this to a 3D plane (via a Mesh Instance 3D) - is the process similar or are there some gotchas?

  • @Yokulovescake
    @Yokulovescake ปีที่แล้ว

    Great video, it works perfectly but looks very weird when I tried using it for my player when he steps in a pond, please help 🥺

  • @benhurworth1499
    @benhurworth1499 7 หลายเดือนก่อน

    Has anything changed recently? I can't get it working :/ It stops working when I add time. Thanks regardless!

    • @benhurworth1499
      @benhurworth1499 7 หลายเดือนก่อน +1

      i have just tried sin or cos-ing the TIME think that was the problem

  • @the_RCB_films
    @the_RCB_films 4 หลายเดือนก่อน

    do u have this for godot 4.2?