How to create a vertex shader similar to Subway Surfers?
I'm trying to make a post processing shader/material for an infinite runner like Subway Surfers. In SS they spawn their map pieces all in a straight row then use the shader to simulate the turning. I've got a cubic lens distortion shader working from a tutorial from http://eat3d.com/free/ue4-shader-fx-cubic-lens-distortion but I can't figure out how to get it to work without a texture. The post processing effect simply shows the texture and not the rest of the game.
Can anyone point me in the right direction as to how to do this? I haven't used UE4 long, I've got more of a Unity background. Would it be possible to find and grab the material/shaders from the VR demo and use that?
asked Oct 10 '14 at 06:07 PM in Blueprint Scripting
I've tried to achieve the curvature effect seen in Subway Surfer with a different approach. I use a Material on the objects themselves that I would like to be affected by the curvature. It's a simple a maybe not perfect solution, I'd gladly accept any ideas to improve it.
Here is the relevant part of the material:
To utilize it, simply connect the output of the rightmost node to WorldPositionOffset input in your material.
The effect in action, with and without the connection to WorldPositionOffset:
I hope it helps!
answered Nov 14 '14 at 11:23 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here