try `render_mode depth_draw_always;` That may fix your problem where you need to sample the depth texture
@iDigvijaysinhGАй бұрын
Hey, I tried it, but doesn't work, surprisingly though "depth_draw_never" works, so I am going to interpret it like we are exclusively telling not to calculate depth for a fragment and then specifying the depth explicitly which kind of make sense but this is just my head canon. And thank you so much for answering, it is solved because of your reply. You are breath-taking! For future readers, the context is 12:51
@nullvoid35452 ай бұрын
Wow. This was super informative! Thanks for the visualized math sections, they help me understand things like the matrix values much better.
@iDigvijaysinhG2 ай бұрын
I am glad you find it helpful.
@Infinte_log2 ай бұрын
Thank you for this video ❤.
@iDigvijaysinhG2 ай бұрын
Hope you enjoyed it.
@Aye_Sid2 ай бұрын
Bhai audio and video synchronized perfectly 🙂🙌 and thanks for the video.🙏🏻
@iDigvijaysinhG2 ай бұрын
I am glad you liked it 😊
@DarkeyPro2 ай бұрын
the depth part at the end was very helpful thinks
@iDigvijaysinhG2 ай бұрын
Hope you learned something new.
@Boildroid2 ай бұрын
Thank you.
@iDigvijaysinhG2 ай бұрын
My pleasure.
@question_mark2 ай бұрын
BRO ur my hero 🫡 tysm
@iDigvijaysinhG2 ай бұрын
Thanks
@Foxguyanimation2 ай бұрын
Nice tutorial! Very simple and useful. Thx! how to calculate depth differences to make an outline?
@iDigvijaysinhG2 ай бұрын
Thanks and for the outlines check out my latest video.
@kataeah2 ай бұрын
Hey! Thanks for the tutorial it was super helpful!! I'm still a little confused and struggling to understand the reversed Z axis in Godot 4.3 as I tried to follow along with 4.3 and ended up with the same results as you where objects further away appear more white altho you mentioned they should appear black if further away, am I still getting something wrong? How can I make reversing the Z values easier for myself? I'm new to Godot shaders and would really appreciate any tips!
@iDigvijaysinhG2 ай бұрын
Hey, 7:40 Reverse Z will only affect the outcome if you are doing anything in clip space. I have converted that to view space hence the output will be identical in all Godot 4.x versions. You can still visualise the depth before converting it to view space to notice the difference. My last example when I am overriding the depth values are in clip space so there your results will differ from mine in 4.3. So TLDR, reverse Z will only affect things if you are doing calculations in clip space.