Proper way to rotate a POM (Parallax Occlusion Mapping)

I had the need to rotate a material which used Parallax Occlusion Mapping, but found the base POM material function to not support rotation. To help anyone else in the same situation, below are the changes I made to the POM function to provide a rotation parameter that functions with POM. Please let me know if you think there is a better way to do this.


thanks man. it works! you’ve saved few hours for me:)

thanks, saved my day

Keep in mind if you rotate the UVs of a heightmap for purposes such as PoM, you’ll also need to rotate the vectors within the corresponding normal map or else the shading will be incorrect. It’s not enough to rotate the UVs of a normal map.