- Home /
Vertex Shader problem with _WorldSpaceCameraPos
Hey fellas,
I'm currently writing a vertex shader based on tanoshimis vertex shader published in this post "Moving vertices in shaders" where I want to translate the vertices based on my camera position.
I get the camera position from _WorldSpaceCameraPos . However, it seems like it doesn't get updated every frame. The first frame is correct. But as soon as I rotate the camera, the translation sticks the way it was made when the camera was in its original position.
Any idea how to access this problem?
Post your actual shader code. Your explanation of your problem and what you're doing is insufficient.
You know that the vertices are already moved by the camera position. That's part of the projection into screen space. If you add / subtract the camera position again that would mean the camera position might cancel out. That's why it's important to know what exactly you're doing.
Your answer
Follow this Question
Related Questions
Add new vertex attributes for a shader,Create vertex attributes 0 Answers
Weird shader behavior , when displacing vertices. 1 Answer
How to move vertices up/down randomly in shader. 1 Answer
Making the camera follow vertices 0 Answers
Modify vertex position using shaders on Windows Phone 8 0 Answers