Learning #GodotEngine - Shader Color By Distance from Camera
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
Other Videos By TheRealBlackNet
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.