public static Material MatFrom(string texPath, Shader shader, PatternProperties properties, int renderQueue) { return(MatFrom(new MaterialRequestRGB(ContentFinder <Texture2D> .Get(texPath, true), shader, properties) { renderQueue = renderQueue })); }
public static Material MatFrom(Texture2D srcTex, Shader shader, PatternProperties properties, int renderQueue) { return(MatFrom(new MaterialRequestRGB(srcTex, shader, properties) { renderQueue = renderQueue })); }
public override void ResolveReferences() { if (properties is null) { properties = new PatternProperties(); } if (properties.tiles is null) { properties.tiles = new Dictionary<string, float>(); } if (IsDefault) { properties.IsDefault = true; } }
public MaterialRequestRGB(MaterialRequest req, Texture2D patternTex, PatternProperties properties, bool isSkin) { shader = req.shader; mainTex = req.mainTex; maskTex = req.maskTex; this.properties = properties; color = properties.colorOne ?? Color.white; colorTwo = properties.colorTwo ?? Color.white; colorThree = properties.colorThree ?? Color.white; tiles = properties.tiles.TryGetValue("All", 1); displacement = Vector2.zero; this.patternTex = patternTex; renderQueue = req.renderQueue; shaderParameters = req.shaderParameters; this.isSkin = isSkin; }
public MaterialRequestRGB(Texture2D tex, Shader shader, PatternProperties properties) { this.shader = shader; mainTex = tex; maskTex = null; this.properties = properties; color = properties.colorOne ?? Color.white; colorTwo = properties.colorTwo ?? Color.white; colorThree = properties.colorThree ?? Color.white; tiles = properties.tiles.TryGetValue("All", 1); displacement = Vector2.zero; patternTex = null; renderQueue = 0; shaderParameters = null; isSkin = false; }
public MaterialRequestRGB(Texture2D tex, Shader shader) { this.shader = shader; mainTex = tex; maskTex = null; properties = new PatternProperties(); color = Color.white; colorTwo = Color.white; colorThree = Color.white; tiles = 1; displacement = Vector2.zero; patternTex = null; renderQueue = 0; shaderParameters = null; isSkin = false; }