Learning #GodotEngine - Shader Color By Distance from Camera

Subscribers:
64
Published on ● Video Link: https://www.youtube.com/watch?v=sp60DuShrFg



Roblox
Game:
Roblox (2006)
Duration: 1:17
65 views
2


Watched tutorials from @danielilett here he showed how to use the global position.
The solution to my problem having a VARYING "WorldPos"
its the model matrix and vertex TransformVectorMulti(AxB)

With VARYING getter I can now calulate the distance from worldpos of the polygons to the camera (Subtract then gettinig the lenght of the resulting vector)

With this I can now paint the squares into 3 colors. Next a RGB gradient.

https://twitter.com/TheRealBlackNet/status/1763666449367756847
images of the shader on twitter







Tags:
Godot
GodotEngine
Shader
VisualShader



Other Statistics

Roblox Statistics For TheRealBlackNet

At this time, TheRealBlackNet has 112 views for Roblox spread across 2 videos. His channel published less than an hour of Roblox content, less than 0.88% of the total video content that TheRealBlackNet has uploaded to YouTube.