Godot 4: Learn to create custom nodes for visual shaders (tutorial)

Поділитися
Вставка
  • Опубліковано 20 жов 2024

КОМЕНТАРІ • 5

  • @LJ_Dev
    @LJ_Dev 9 місяців тому +3

    Nice I love to see fresh videos about shaders in Godot! Thanks!
    Off-topic question: Is it possible to generate an image with a shader and then implement collisions based on specific colors? This is for creating 2d dungeons, maps, levels using Perlin noise, simplex noise, etc.
    I'd appreciate more tutorials on procedural generation with a smoother aesthetic, avoiding the constant use of square tilemap solutions..

    • @FencerDevLog
      @FencerDevLog  9 місяців тому +1

      You are welcome! As for collisions, that would be a bit difficult because shaders run on the GPU and don't have any information about the node tree or other Godot elements like collision shapes. Perhaps compute shaders could be used, which return output in a storage buffer that can be further utilized in GDScript. However, I haven't tried that yet.

    • @LJ_Dev
      @LJ_Dev 9 місяців тому

      @@FencerDevLog Yes, that's my problem. In Godot is posible to generate collisions from an alpha. I just have to figure it out how to get that alpha from the shader.
      Thanks for your response.!

  • @Chaosus
    @Chaosus 9 місяців тому +1

    _get_default_input_port should return an index of the default port (in case of the single input port, it's 0). The input port override is not a mandatory, since only the output port connected directly or indirectly to the Output node is taken into account. Anyway, thanks for this video, hope my work on visual shaders will be useful for other developers in Godot.

    • @FencerDevLog
      @FencerDevLog  9 місяців тому

      Thanks for your comment! Yes, it's likely that I wasn't fully accurate in all details.