Mojo3d pbrmaterial new
mojo3d:mojo3d.PbrMaterial.New
Method New:Void( )#
Method New:Void( color:std.graphics.Color,metalness:Float=1.0,roughness:Float=1.0 )#
Method New:Void( material:PbrMaterial )#
Creates a new pbr material.
All properties default to white or '1' except for emissive factor which defaults to black.
If you set an emissive texture, you will also need to set emissive factor to white to 'enable' it.
The metalness value should be stored in the 'blue' channel of the metalness texture if the texture has multiple color channels.
The roughness value should be stored in the 'green' channel of the metalness texture if the texture has multiple color channels.
The occlusion value should be stored in the 'red' channel of the occlusion texture if the texture has multiple color channels.
The above last 3 rules allow you to pack metalness, roughness and occlusion into a single texture.