示例#1
0
 /// <summary>
 /// Sets the shader and properties to the input material
 /// </summary>
 /// <param name="material"></param>
 public void apply(Material material)
 {
     material.shader = TexturesUnlimitedLoader.getShader(shader);
     TextureSet.updateMaterialProperties(material, shaderProperties);
     TextureSet.fillEmptyStockTextureSlots(material);
     material.renderQueue = TexturesUnlimitedLoader.isTransparentMaterial(material) ? TexturesUnlimitedLoader.transparentTextureRenderQueue : TexturesUnlimitedLoader.diffuseTextureRenderQueue;
 }
示例#2
0
 /// <summary>
 /// Sets the shader and properties to the input material
 /// </summary>
 /// <param name="material"></param>
 public void apply(Material material, bool isIcon = false)
 {
     if (isIcon)
     {
         material.shader = TexturesUnlimitedLoader.iconShaders[shader].iconShader;
     }
     else
     {
         material.shader = TexturesUnlimitedLoader.getShader(shader);
     }
     TextureSet.updateMaterialProperties(material, shaderProperties);
     TextureSet.fillEmptyStockTextureSlots(material);
     material.renderQueue       = renderQueue;
     material.mainTextureOffset = textureOffset;
     material.mainTextureScale  = textureScale;
     Log.replacement("Updated material properties\n" + Debug.getMaterialPropertiesDebug(material));
 }