- Home /

# Sphere and normal mapping problem with Shader Graph

This is probably something relatively simple but I am new to shader graph and don't have that much shader experience in general.. I have an ocean shader that alters the normals to create this watery effect on the surface. This works plenty fine when I apply the shader to a quad or a plane, but when I apply it to a sphere, this happens.

In my mind, the issue is that the normals are not rotated properly when not working on a plane. How can I make the normal adjustment for the water effect be relative to the original normal of the fragment to make this work on any surface? I have tried:

Multiplying the normal with world space normal vector

Multiplying the normal with object space normal vector

Multiplying the normal with tangent space normal vector

Multiplying the normal with view space normal vector

None of these helped and at least tangent space had weird results.

I'm not entirely sure how you are doing this, but normal mapping is ordinarily done using a TBN matrix - a 3x3 matrix consisting of first the tangent, then the bitangent (cross product of normal and tangent) and finally the normal. You can then multiply the normal map by the transpose of this matrix to convert the normals from tangent space (in which normal maps are stored) to world space.

Thank you, I'll give it a shot! Haven't solved this yet, but I had decided to defer the problem until later.

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.