Godot Version
4.2.2
Question
In Blender Shader Editor there is a Geometry input node, that produces a vector from every point on the surface to the camera. I tried to figure out a way to get this vector in Godot, but without success.
Someone asked this question here, but the proposed solution did not work for me and the author too, it seems.
If anyone got an idea of how to achieve this, I would much appreciate it, as are others in the future, I think
Sounds like the first part of a matcap material, maybe you can chop up this shader to display the matcap_uv?
ah it does nothing with the VIEW though, nevermind. What is your material for? it could be costly to calculate inverse VIEW matrix for every pixel each frame, maybe there is a faster way?
I want to use it to create a parallax mapping for the textures, so it appears to have depth without an actual geometry. I ended up using “Parallax Mapping” node in Shader-Lib, but looking at the code of it I feel concerned about hard-coded values that it has. I’m not entirely sure how it works though
1 Like