Ejemplo n.º 1
0
 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
     }));
 }
Ejemplo n.º 2
0
 public static Material MatFrom(Texture2D srcTex, Shader shader, PatternProperties properties, int renderQueue)
 {
     return(MatFrom(new MaterialRequestRGB(srcTex, shader, properties)
     {
         renderQueue = renderQueue
     }));
 }
Ejemplo n.º 3
0
		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;
			}
		}
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
 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;
 }