parallax / depth offset grass shader

I really like this shader for grass that they designed for act of aggression, Im trying to backwards engineer it. I feel close but missing some important elements. Or maybe Im way off

so i ve played around with a basic noise texture as a height map using bump offset in ue4 and i can get the vertical parrallax feel of the grass, but theirs has distinct caps to the grass which i can t figure out

but more critical is how theres interact with objects, take note of the rock. I suspect they re using something like pixel depth offset along with the vector of the camera. I havnt been able to reproduce the effect but I ve yet to try incorporating the camera vector into my shader yet

Love to hear opinions on how peeps think they did this and if its possible / how to go about it in ue4


Good post, I would also like to see some material blueprint examples for this type of effect. There are numerous videos and screenshots in threads on this board yet but I’ve yet find an example or tutorial to show how the POM or Bump Offset grass effect was achieved. Just wish other users would be more willing to share knowledge after they showcase something.

Good examples in the following videos. There are user comments for each video asking for some insight with zero response from either person.


I did the second video you posted. I’m happy to answer any questions you have. It was basically done by putting a noise map into the POM material function and reading in a separate ‘wind noise’ texture to do the wind in the POM loop which required slight modification to the HLSL code. I need to update it to use the latest POM which has some optimizations.


Thank you for replying. Ahhh, so you did have to modify the HLSL shader code in C++? Going to mess about with adding a noise map to POM as you noted.

Any chance you could attach a screenshot of your material after you have updated it with latest POM options?

You can get a version pretty close to what dopiken did without modifying the hlsl code, but you will need to modify some nodes.

I did it by just adding a panning noise normal map and adding that result to the pre-transformed CameraVector, and then normalizing that and passing it through as it was. Of course you can multiply your noise map by a vectorparam to control the intensity.

The one artifact if you do it this way, is that that the wind value will be determined at the surface level and the grass won’t look up into new values as it traces. In order to do that (which it sounds like dopiken may have done), you need to pass the ‘wavy normal’ texture into the POM function as a texture object and actually raytrace it along with the heightmap and re-transform the view ray at each iteration.

great work on the grass, im setting up my own, as per ryan bruck’s suggestion, which looks okay, but up close the artifact is very heavy. any clues on how you did the custom POM code to offset with a normal map?