- Home /
Vertex Displacement Shader Graph With The Camera Moving Issue
I have this foliage sway shader, it works well.
https://drive.google.com/file/d/1ebG5bYYPdyqA9rS1ZI8_0Z11acpFxyYI/view?usp=sharing
https://drive.google.com/file/d/1yBoZygQGKzu4ikaFsrqHVn4tnZsbUJhx/view?usp=sharing
But when the camera moves the vertex displacement stops:
https://drive.google.com/file/d/1dDg2qOJ6ERrmhYeOLzyer5q2mlxT8DOb/view?usp=sharing
And the weird thing also is that if I move the camera to the right nothing seems to happen, but moving the camera only to the left causes the issue.
Googling it shows that the position node's world space takes camera position into account, and the presumed fix is to change all position nodes to absolute world space, and also make the transform node convert from absolute world to object space. But that didn't fix it sadly. Any ideas could help, thank you.
Answer by JonnyHilly · Mar 31 at 05:44 PM
@KinanGH sounds like a UV sign ( negatives) issue... Probably the texture/noise UV's are being taken from the camera position... and when you move the camera you are getting negative... or too large UV's Check the textures you are using... especially any noise textures, and make sure thye are all set to WRAP, and NOT clamp mode.... WRAP means the UV's will wrap infinitely... positive or negative.
I think you're right, but in my example I was using the GradientNoise node, and it doesn't have a sampler, so no wrap mode. But I was using the Position node to feed the UV's for the GradientNoise, so I switched the Position node with the UV node and that solved the issue.
So for anyone that uses a sample texture noise, you could do as JonnyHilly said.
Thanks for answering.