BACKGROUND: Hey, folks. I have an HDRP shader created via Shader Graph that performs basic vertex displacement based on noise. Being new to both HDRP and Shader Graph, I based the shader on several tutorials. In the tutorials, the camera position is subtracted prior to being routed into the Vertex Position in the master node. I’m using HDRP 8.2.0 and subtracting the camera position didn’t work. In fact, simply converting from World to Object space worked fine, contradicting what was mentioned in the tutorials.
QUESTION: My game has a first person character controller, so the camera moves as the character moves. What I’ve noticed is that the vertex displacement works properly when the camera is stationary, but when the camera moves, there’s a detectable acceleration/deceleration effect on the vertices. That implies that something still needs to be added to the shader to compensate for camera motion. Is there something that can be added to my shader to get the vertices to displace independent of the camera motion?
I figured it out. The Position nodes all need to be set to “Absolute World” rather than “World”. The Transform node needs to transform from “Absolute World” to “Object”. Works fine now. It looks like there were some changes in definitions and node semantics since the tutorials that I watched were made.
One important render pipeline feature that unity has in HDRP is camera relative rendering, this can change position/space node requirements a little compared to its BRP and URP counterparts.
Added bonuses include less frequent requirements for world shifting ( 5km + easyish)
slightly better world/screenspace handling
Added negatives, multiple cameras are often more expensive even after custom frame settings
Three years later, I’m super thankful for this post, I was in the weeds for days with this issue. Changing all my Position and Transform nodes to “Absolute World” did the trick.
I had this problem but for me the “problem” was that I was looking at the mesh in scene view. For some reason time doesn’t pass in scene view. It only passes when pressing play and only in the game view.