public AFrameMaterial Create(MaterialElem elem) { var container = elem.Container; var src = ""; if (elem.Map != null) { src = elem.Map.ImagePath; } var shader = new FlatAFrameShader() { Color = container.Color, Repeat = container.MainTextureScale, Src = src, }; var output = new AFrameMaterial() { Shader = shader, Transparent = container.Transparent, Side = (container.Color.a == 1) ? MaterialSide.Front: MaterialSide.Double, }; return(output); }
public AFrameMaterial Create(MaterialElem elem) { var container = elem.Container; var shader = new FlatAFrameShader() { Color = container.Color, }; var output = new AFrameMaterial() { Side = MaterialSide.Front, Shader = shader, }; return(output); }
public AFrameMaterial Create(MaterialElem elem) { var container = elem.Container; var src = ""; if (elem.Map != null) { src = elem.Map.ImagePath; } var shader = new FlatAFrameShader() { Repeat = container.MainTextureScale, Src = src, }; var output = new AFrameMaterial() { Shader = shader, Side = MaterialSide.Front, }; return(output); }