How do I access the Standard Shader Secondary Map (Detail Albedo x2) Offset?

I would like to move a secondary texture map along the X axis but I’m having trouble accessing the parameter. In the editor it’s the Standard Shader / Secondary Map / Detail Albedox2 Offset.

Here’s what I’ve tried:

void Update () 
	{
		DetailTextureOffset = DetailTextureOffset + SpeedVerticalLine * Time.deltaTime;
		material.SetTextureOffset ("_DETAIL_MULX2", new Vector2 (DetailTextureOffset, 0));

	}

I’ve checked this out by replacing:

material.SetTextureOffset (“_DETAIL_MULX2”, new Vector2 (DetailTextureOffset, 0));

with:

material.SetTextureOffset (“_MainTex”, new Vector2 (DetailTextureOffset, 0));

and the main texture moves along the X axis (or is that U as in UV?).
The texture name revealed by switching the Inspector to Debug mode (right click on Inspector switch) is _DETAIL_MULX2, which doesn’t seem to work.

Here’s the section in the Unity manual regarding accessing material parameters:

Thanks in advance for any advice or thoughts!

1 Answer

1

orignal shader src:
_DetailMask(“Detail Mask”, 2D) = “white” {}
_DetailAlbedoMap(“Detail Albedo x2”, 2D) = “grey” {}
_DetailNormalMapScale(“Scale”, Float) = 1.0
_DetailNormalMap(“Normal Map”, 2D) = “bump” {}
use
material.SetTextureOffset (“_DetailAlbedoMap”, new Vector2 (DetailTextureOffset, 0));