2024-05-05 17:01:56 +10:00
|
|
|
public struct Material
|
|
|
|
{
|
|
|
|
public var id: String
|
2024-05-13 01:11:03 +10:00
|
|
|
public var diffuse: Colour, specular: Colour, emmision: Colour
|
2024-05-05 17:01:56 +10:00
|
|
|
public var specularExp: Float
|
|
|
|
public var texture: RenderTexture2D
|
|
|
|
|
|
|
|
public init(id: String = "",
|
|
|
|
diffuse: Colour = .white,
|
2024-05-13 01:11:03 +10:00
|
|
|
specular: Colour = .black,
|
|
|
|
emmision: Colour = .black,
|
|
|
|
gloss: Float = 20,
|
2024-05-05 17:01:56 +10:00
|
|
|
texture: RenderTexture2D = .empty)
|
|
|
|
{
|
|
|
|
self.id = id
|
|
|
|
self.diffuse = diffuse
|
|
|
|
self.specular = specular
|
2024-05-13 01:11:03 +10:00
|
|
|
self.emmision = emmision
|
2024-05-05 17:01:56 +10:00
|
|
|
self.specularExp = gloss
|
|
|
|
self.texture = texture
|
|
|
|
}
|
|
|
|
}
|