Scratcher effect shader - Learning shaders in Godot episode 2

  Рет қаралды 1,234

MrElipteach

MrElipteach

Күн бұрын

Пікірлер: 6
@beedeo3664
@beedeo3664 Жыл бұрын
Hi, I loved your video tutorial. Step by step and very clear. I am new to godot and am trying to make a scratch off. I followed your example and it worked for me but I have a question: How do I know the percentage of the scratched surface? I would like that when 50% of the surface is scratched, the rest of the surface is automatically scratched. Thank you very much! ❤
@mrelipteach
@mrelipteach Жыл бұрын
Thanks, glad you liked it. Honestly I'm not completely sure. The most obvious way to me is to count how many pixels have been changed in the mask texture (the black and white texture on which we draw), but I'm afraid it's going to be quite slow because you have to do it in GDScript.
@melpeslier
@melpeslier 11 ай бұрын
I think we can just use a transparent drawing color ?
@RenatoMeyer
@RenatoMeyer Жыл бұрын
Hey! Awesome tutorial! Can this be aplied to a moving sprite? Like, if I have the sprite of a cow, could I erase the head and then move the cow with a missing head around?
@mrelipteach
@mrelipteach Жыл бұрын
You have to make a shader on the texture and not a screen shader. So yes it can be done with some tweaking
@RenatoMeyer
@RenatoMeyer Жыл бұрын
@@mrelipteach That's cool! Would you say it's similar to what you do here and I could use this tutorial? Or do you think it's too different
Introduction to shaders: Learn the basics!
34:50
Barney Codes
Рет қаралды 338 М.
I Made My First Game in Godot in 3 Weeks...
26:21
Jack Sather
Рет қаралды 372 М.
Cute
00:16
Oyuncak Avı
Рет қаралды 12 МЛН
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 69 МЛН
Stop "learning" gamedev right now
17:00
MrElipteach
Рет қаралды 9 М.
My FAVORITE new features in Godot 4.2 (+ other cool features!)
8:57
PROTOTYPING 1 GAME IN 3 ENGINES
12:28
Rockers Games
Рет қаралды 3,3 М.
I recreated Balatro's effects in Godot
8:04
MrElipteach
Рет қаралды 35 М.
This new type of illusion is really hard to make
17:58
Steve Mould
Рет қаралды 572 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 5 МЛН
I Created My Own Custom 3D Graphics Engine
26:29
Inkbox
Рет қаралды 79 М.
Why Slopes are Shockingly Difficult for Indie Game Devs
17:20
Inbound Shovel
Рет қаралды 152 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 716 М.
Cute
00:16
Oyuncak Avı
Рет қаралды 12 МЛН