Do not procrastinate on the exercise at the end. Also at 26:38 there is slight oversight by me. You have to free linear_sampler once you are done with it using RenderingServer.free_rid() to avoid memory leaks. Do that in _notification()
@iDigvijaysinhG3 ай бұрын
If you are struggling! Here's the files. www.patreon.com/posts/outline-post-and-111425719?Link&
@felixruttan69242 ай бұрын
Sweet crash course on this new feature. Also really appreciate your philosophy/reasoning for not providing the code! Like, it might get you a few patrons here or there, but ultimately we both know how important it is to go threw the process of writing it out and thinking about it!
@millerbyte2 ай бұрын
You're doing great things on this channel -- looking forward to all your future content!
@iDigvijaysinhG2 ай бұрын
I am glad you liked my videos.
@FredyyDev3 ай бұрын
Great explanation man! I have so many questions but I won't bother you with them hahah
@iDigvijaysinhG3 ай бұрын
Thanks, and you can ask the questions, I would be happy to help.
@learninglearning22 ай бұрын
can you make a video about using rendering device, and how to use it to draw instanced meshes indirectly?
@iDigvijaysinhG2 ай бұрын
Hey, I think this video is a good example about using a rendering device and compute shaders in general. However, I am curious about "indirectly rendering instanced meshes" part. Could you elaborate more?
@drokles23 күн бұрын
Hey man, cool video. Quick question, why do you append ints to the push_constants which is a PackedFloat32Array?
@iDigvijaysinhG23 күн бұрын
Hey, I have created size as integer vector because pixels won't going to be floats, however to dispatch that to my compute shader, I can only pass it via PackedFloat32[]. There is no extra reasoning behind it, you can use size as "vector2" instead of "vector2i"
@williamgodwinACAB3 ай бұрын
Still interesting, is it possible to write from compute shader directly to tex\buffer in VRAM and use it in spatial shader, without saving it like some resource in CPU RAM?
@iDigvijaysinhG3 ай бұрын
Hey William, I am sorry, seems like I haven't understood that properly. Could you elaborate?
@jafarrolo3 ай бұрын
Hey, I wrote you on the other video a few days ago regarding implementing the outline shader through a compositor effect and by looking again at these two videos (this one and the outline one) I was able to solve the exercise at the end of this video! Yay! I am having only one issue, in the outline video you solve the "problem" of not seeing what is not part of the outline with a simple ALPHA = outline, but in glsl this doesn't work, I also tried to set the color.a value but everything that I put is ignored. I solved it by doing: if (outline > 0.1) { color.rgb = vec3(outline) * p.outline_color; } In this way it solves the issue, but I don't think it's right and I would prefer to use the alpha channel if possible, but is it possible? Do you have some learning material about this specific thing to point me toward?
@iDigvijaysinhG3 ай бұрын
Hey, first of all great job you pulled it off. That's amazing!! Now coming to your question, it is a bit hard to explain in the comment how transparency works in computer graphics. But you could look it up with search term like "Alpha blending in shader / CG" And here the issue is not the GLSL itself. It is the fact that we are dealing with post processing. Post processing generally means we are reading the screen texture/ frame buffer, doing some additional stuff like e.g. color grading. And storing back the result. And in this regard there is no concept of transparency. Like I can't make half my screen transparent you know, it would just be black (Bad example but hope it makes sense). You could also solve the problem with something like this, color.rgb *= 1. - outline; color.rgb += outline_color; So there can be multiple ways to solve the same problem. Finally a question for you, you have come up with a solution, why do you think it is not correct if it yields desired result? (unless of course it's tanking the FPS)
@jafarrolo3 ай бұрын
@@iDigvijaysinhG thank you for the answer! And yeah, your examples make totally sense to me, we're working with a 2D image on a screen and saying "this pixel has this color and it is also transparent" doesn't make much sense, I thought about it for a moment and it's part of the reason why I came out with that solution of discarding the low values of outline, but I wasn't sure so I asked. I think that it is not correct because in that way I discard part of the output and maybe there are values under 0.1 that could be important for some reason, so I thought it would be better to use all of the possible values of outline that I have, now that I think about it more I think I can just move that value in the parameters so that I can change it at runtime. Also I wanted to understand if and how blending and mixing colors works since I don't know if it will be useful for other effects that I want to implement, so changing those options and understanding better how the render pipeline can be modified / edited in a proper way could be useful, but at the moment I have not enough experience in computer graphics to understand what everything means, sadly :D Anyway your video helped A LOT, so thank you again, from the Godot documentation I couldn't even understand how to pass parameters.
3 ай бұрын
Hey can you make a video about how to make a post process toon shader?
@iDigvijaysinhG3 ай бұрын
Hey, Well I am out of ideas for the next video to be honest but there is already a lot of stuff available. So I will see if I can add some value but no promises 😅
@felixruttan69242 ай бұрын
@@iDigvijaysinhG as for potential new ideas: would it be possible to use the compositor to apply vertex displacement to a specific set of meshes/materials? Using this to animate water and/or wind on foliage could be cool if this is lower level/more performant than current methods.
@iDigvijaysinhG2 ай бұрын
@@felixruttan6924 it is possible to displace group of objects (in limited capacity) but it won't be vertex displacement. As for which one is more performant, the answer to that is as always, it depends. If you have 4 objects which are mostly primitive shapes, vertex shader on each one of them will be more performant. If you have objects with a lot more polygons then the post process will be more performant but as I said displacing only a group of objects is a bit tricky but definitely doable.
@Infinte_log3 ай бұрын
Great video, though most of that script went above my mind😅
@iDigvijaysinhG3 ай бұрын
Don't worry @Infinte_log!, keep in mind the Compositor and Compute shaders both are advanced topics. So don't feel discouraged. Now, I want you to get you hands dirty and follow along (don't just watch), once you practice this 2 or 3 times your mind will start to join the pieces together. You don't have to memorize the scripts but you should be aware of what every single line of code is doing.
@NihongoWakannai3 ай бұрын
@@Infinte_log a lot of it is just boiletplate code to link the shader in with godot's render pipeline. A lot of it you can just copy and paste
@DerArchie3 ай бұрын
Im having brain damage trying to remake this in C# :'D
@iDigvijaysinhG3 ай бұрын
Hey, First I have to be honest with you that I never bothered using C# with Godot, but based on the code snippets on the documentation, most of the methods are identical to GDScript. If you are having trouble with a specific part, tell me and maybe I can better help you that way.
@DerArchie3 ай бұрын
No problem! The video is already amazing as it is :) Great job on it!
@NihongoWakannai3 ай бұрын
Yeah even though I use C# I did it with gdscript first. I'm gonna try C# too though because the lack of typing and good intellisense in gdscript made it even more confusing lol Edit: I did it in C#, a couple things required looking through documentation but I definitely like it more than gdscript
@DerArchie3 ай бұрын
@@NihongoWakannai I agree
@squarerootof23 ай бұрын
So nice to see your face, Digvijaysinh. I somehow imaged you blonde with blue eyes. Silly me!
@iDigvijaysinhG3 ай бұрын
😅 but thanks
@squarerootof23 ай бұрын
The result was impressive for that minimal work, wasn't it?