예제 #1
0
		private void SetupMaterial(ref TextureMergeRect textureMergeRect, UMAData.MaterialFragment source, int textureType)
		{
			textureMergeRect.tex = source.baseTexture[textureType];
			textureMergeRect.mat.shader = (textureType == 1)? normalShader : diffuseShader;
			textureMergeRect.mat.SetTexture("_MainTex", source.baseTexture[textureType]);
			textureMergeRect.mat.SetTexture("_ExtraTex", source.baseTexture[0]);
			textureMergeRect.mat.SetColor("_Color", source.GetMultiplier(0, textureType));
			textureMergeRect.mat.SetColor("_AdditiveColor", source.GetAdditive(0, textureType));
		}
예제 #2
0
		private void SetupMaterial(ref TextureMergeRect textureMergeRect, UMAData.MaterialFragment source, int i2, ref Rect overlayRect, int textureType)
		{
			textureMergeRect.rect = overlayRect;
			textureMergeRect.tex = source.overlays[i2].textureList[textureType];
			textureMergeRect.mat.shader = (source.slotData.asset.material.channels[textureType].channelType == UMAMaterial.ChannelType.NormalMap) ? normalShader : diffuseShader;
			textureMergeRect.mat.SetTexture("_MainTex", source.overlays[i2].textureList[textureType]);
			textureMergeRect.mat.SetTexture("_ExtraTex", source.overlays[i2].textureList[0]);
			textureMergeRect.mat.SetColor("_Color", source.GetMultiplier(i2 + 1, textureType));
			textureMergeRect.mat.SetColor("_AdditiveColor", source.GetAdditive(i2 + 1, textureType));
		}