Problems programmatically setting normal texture

I’m working on procedural generating a planet. I’ve managed to create my normal texture from 3d perlin noise, and mapped it to my cube-turned sphere.

Here it is rendered as the main texture:

using:

planetRenderer.materials[i] = new Material(Shader.Find("Bumped Diffuse"));
planetRenderer.materials[i].SetTexture("_MainTex", normalTexture);// faces[i]);

However, when I try set this as the normal texture using this:

planetRenderer.materials[i] = new Material(Shader.Find("Bumped Diffuse"));
planetRenderer.materials[i].EnableKeyword("_NORMALMAP");
planetRenderer.materials[i].SetTexture("_BumpMap", normalTexture);

I just get this kind of shiny effect, no normal mapping at all (but if I don’t set the normal, no shiny effect):

Edit: Seems to work on the “preview” if I inspect the material during runtime:

Ah!

It’s how Unity compresses the normals. I found the solution here: