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.
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
\o/ my weekly dose ! keep it up man, very interesting !
Heh, thank you. 😎
This is perfect!
Thank you!
good man
Thanks man!
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!
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.
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
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
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.
Yes, you are right. Thanks for finding that!
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.
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.
@@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.
I'm on godot 4.2.2 and this brighness thing doesn't work, but putting the b in the diagonal with 1s does... 🤔
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.
I knew it made sense to mention the importance of the order when multiplying vectors and matrices. 😎 And thanks for watching.