- Home /
Making Secondary Map Texture Animation
Hi All,
I can't find the way to display the Secondary Normal Map offset changes the way I do it on Main Texture or Bump Maps.
This line in the update changes the value in the Inspector but nothing is shown in PlayMode
m_offsetSecondary += _deltaTime * m_stepSecondary;
m_offsetSecondary.x = Mathf.Repeat( m_offsetSecondary.x, 1 );
m_offsetSecondary.y = Mathf.Repeat( m_offsetSecondary.y, 1 );
m_material.SetTextureOffset( "_DetailNormalMap", m_offsetSecondary);
I can see the values changing during playtime in material inspector but the secondary normal map is not moving.
I've also tried EnableKeywork instruction in the Start() method.
The Keyword is the good one and it should be working fine... but it's not.
Any idea ?
O$$anonymous$$ In fact there is an error in the Debug $$anonymous$$ode for secondary maps :
I've added the texture on the Secondary $$anonymous$$ap and changed tiling to 0.2
Then from editor I've activated Debug $$anonymous$$ode and searched for the line where my texture is, it is shown to be null in _DetailAlbedo$$anonymous$$ap and my texture in _DetailNormal$$anonymous$$ap.
So, the Texture Reference are inverted between this two arrays (and modifying Albedo$$anonymous$$ap works now).
Your answer
![](https://koobas.hobune.stream/wayback/20220612104120im_/https://answers.unity.com/themes/thub/images/avi.jpg)