public static EmissiveMaterial Emissive(vec4 lightColor, float shinness = 0, float reflectance = 0, float translucence = 0, float density = 1.8f, IImage diffuse = null) { return new EmissiveMaterial { Diffuse = diffuse ?? Images.From(lightColor.ToColor()), LightColor = lightColor, Shinness = shinness, Reflectance = reflectance, Density = density, Translucence = translucence }; }
/// <summary> /// Crea un material diffuse. /// </summary> public static Material Rough(vec4 diffuse) { return new Material { Diffuse = Images.From(diffuse.ToColor()), Shinness = 0, Reflectance = 0f, Translucence = 0 }; }
/// <summary> /// Crea un material traslucido. /// </summary> //modificado para annadir densidad public static Material Translucent(vec4 diffuse, float shinness, float reflectance, float translucence, float density = 1.8f) { return new Material { Diffuse = Images.From(diffuse.ToColor()), Shinness = shinness, Reflectance = reflectance, Translucence = translucence, Density = density, }; }
/// <summary> /// Crea un material brilloso /// </summary> public static Material Glossy(vec4 diffuse, float shinness, float reflectance) { return new Material { Diffuse = Images.From(diffuse.ToColor()), Shinness = shinness, Reflectance = reflectance, Translucence = 0 }; }