Modifying vertex normals & tangents in custom shader code
I want to port a Unity3D project that I created to UE4.
The game uses a custom vertex shader to modify positions, normals & tangents from the incoming vertices to bend them to form a sphere. The effect can be seen here: https://www.youtube.com/watch?v=CyTU03Ceo6I
I was able to modify the vertex positions with a custom node and put the result into the "World Position Offset", while subtracting the world position at the same time to have a new unique vertex position.
My problem is that I have no idea how to modify the normals & tangets for correct lighting.
As I see this, the "World Position Offset" is the only node that is computed in the vertex shader part, but theree are no normal / tangent vertex nodes available.
I may be able to modify the interpolated vertex normal in the fragment shader part and modify the "Normal" node accordingly, but from a performance view, this would be a bad option.
For the tangent, there is no output node at all.
asked Nov 07 '14 at 09:39 AM in Rendering
Custom shaders go into the
Follow this question
Once you sign in you will be able to subscribe for any updates here