Godot 4: Brightness, contrast, saturation (shader tutorial)

Поділитися
Вставка
  • Опубліковано 7 жов 2024
  • 📖 Godot 4 book: filiprachunek....
    💡 Get exclusive content on Patreon: / fencerdevlog
    🎮 Wishlist Whispers of Prague on Steam: store.steampow...
    🎨 Color matrix guide: docs.rainmeter...
    🚀 Space Shooter tutorial: • Godot 4 Tutorial: From...
    🖥️ Space Shooter source code: github.com/Fil...
    #godot #godot4 #godotengine #shaders
    Hi everybody! I recorded this video after a few experiments with color changes using a shader on a sprite. Let's take a look at the options we have available.

КОМЕНТАРІ • 19

  • @FencerDevLog
    @FencerDevLog  3 місяці тому

    Thank you for watching. 😎 Help support this channel:
    Patreon: www.patreon.com/FencerDevLog
    Gumroad: filiprachunek.gumroad.com
    UA-cam Memberships: www.youtube.com/@FencerDevLog/join

  • @psychobarge5279
    @psychobarge5279 4 місяці тому +1

    \o/ my weekly dose ! keep it up man, very interesting !

  • @SapoRigeno
    @SapoRigeno 3 місяці тому

    This is perfect!

  • @JebaliJihed-g5c
    @JebaliJihed-g5c 4 місяці тому

    good man

  • @toto1539
    @toto1539 3 місяці тому

    very well made tutorial!
    Is there any way to make the script you displayed apply to the color of a UI node's "theme_override_style_panel". I am aware of the canvasItem's material section, but inserting the shader into that material slot simply overrides the panel's color, rather than adjusting it according to the shader settings. I am making a game entirely with UI nodes, so I'd be grateful for a response!

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

      Thanks for watching! I'm afraid that shaders don't work with themes and theme overrides, so something like that would probably be quite difficult. I'll try to think about it.

  • @Kay-eh8lm
    @Kay-eh8lm 2 місяці тому

    awesome :)
    how could you make this work to filter the game in real time through the camera? like not modulating a still image as in your example, but a filter over everything. I guess "post processing" stuff is what I'm looking for but not sure

    • @FencerDevLog
      @FencerDevLog  2 місяці тому

      Thanks! 😎 I suppose you can use the screen-reading texture to filter over everything. Check out the CRT monitor effect video: ua-cam.com/video/Y-nlehcp6Ws/v-deo.html

  • @vonbluhm7201
    @vonbluhm7201 2 місяці тому

    Are there typos at shader:29 and :30 ?
    29: float sb = (1.0 - s) * luminance.g;
    30: float sg = (1.0 - s) * luminance.b;
    I can't help thinking that they should be
    29: float sg = (1.0 - s) * luminance.g;
    30: float sb = (1.0 - s) * luminance.b;
    Feel free to correct me.

    • @FencerDevLog
      @FencerDevLog  2 місяці тому

      Yes, you are right. Thanks for finding that!

  • @giuseppezani9049
    @giuseppezani9049 4 місяці тому

    hey Man, do a tutorial on how to convert 2d shader to 3d in godot. Assuming that the 2d surface is cloned on every surface in 3d. thanks.

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

      You mean something like the plasma shader (from my other video) that would be projected on a 3D model surface as a texture? Yes, that could be achieved with a help of SubViewport.

    • @giuseppezani9049
      @giuseppezani9049 4 місяці тому

      @@FencerDevLog or Rewrite to spatial shader without a viewport using shader type spatial. Ignoring the z coordinate / vertex section of the shader. I understand that using the viewport all is done at 0 expenses.

  • @xdanic3
    @xdanic3 3 місяці тому

    I'm on godot 4.2.2 and this brighness thing doesn't work, but putting the b in the diagonal with 1s does... 🤔

    • @xdanic3
      @xdanic3 3 місяці тому

      Ok, I should have keep watching the video 🤦‍♂, order of operands matters 10:30, I was trying to make it myself once I saw how the matrix had to be.

    • @FencerDevLog
      @FencerDevLog  3 місяці тому

      I knew it made sense to mention the importance of the order when multiplying vectors and matrices. 😎 And thanks for watching.