POM material

No progress yet, but actually you are indeed on the right path to hacking around . I just did something similar to solve an unrelated tree billboard.

So in code, during the shadow pass, the View Transform gets overridden, replacing the CameraVector with the Light Vector. So that means you have access to the light direction by reading the view transform.

You can use that information in the WorldPositionOffset shader to pull towards the light. note it will only be per vertex, not per pixel.

The way you have to do that currently is define a VectorParameter for your light vector using a blueprint. Then in the material you can do product of 0,0,1 transformed from View->World space and your lightvector. Then you can check if the product is greater than a certain threshold value (ie 0.97 or something I think I used). If that returns true, you know you are in the shadow pass. If not you are in the camera pass.

Now of course a slight limitation to method is that it will ALSO kick in the behavior when your camera is perfectly (or nearly) aligned with your light vector. In most cases that is very rare, and even if it does happen its not a big deal since the views are very close and you won’t be changing the result very much.

Hope that make sense.

Its on the list to one day override CameraPosition to be LightPosition in the shadow pass. Its harder than changing the view transform because at the point where the shadows are rendered the engine doesn’t have direct access to the uniform shader parameters, just a limited set of them.