* Add support for sheenColor and sheenRoughness This work is necessary to support the glTF extension KHR_materials_sheen. This change effectively adds the specular lobe from the cloth material model to the base material model. The cloth model remains useful for its extra subsurface color feature but also because it's cheaper. * Add support for KHR_materials_sheen to gltfio * Update documentation * Document default shading values
86 lines
2.1 KiB
Plaintext
86 lines
2.1 KiB
Plaintext
material {
|
|
name : SolidRefractionScreenSpace,
|
|
shadingModel : lit,
|
|
refractionType : solid,
|
|
refractionMode : screenspace,
|
|
parameters : [
|
|
{
|
|
type : float,
|
|
name : alpha
|
|
},
|
|
{
|
|
type : float3,
|
|
name : baseColor
|
|
},
|
|
{
|
|
type : float,
|
|
name : roughness
|
|
},
|
|
{
|
|
type : float,
|
|
name : metallic
|
|
},
|
|
{
|
|
type : float3,
|
|
name : sheenColor
|
|
},
|
|
{
|
|
type : float,
|
|
name : sheenRoughness
|
|
},
|
|
{
|
|
type : float,
|
|
name : clearCoat
|
|
},
|
|
{
|
|
type : float,
|
|
name : clearCoatRoughness
|
|
},
|
|
{
|
|
type : float,
|
|
name : anisotropy
|
|
},
|
|
{
|
|
type : float3,
|
|
name : absorption
|
|
},
|
|
{
|
|
type : float,
|
|
name : thickness
|
|
},
|
|
{
|
|
type : float,
|
|
name : ior
|
|
},
|
|
{
|
|
type : float,
|
|
name : transmission
|
|
},
|
|
{
|
|
type : float4,
|
|
name : emissive
|
|
}
|
|
],
|
|
specularAntiAliasing : true
|
|
}
|
|
|
|
fragment {
|
|
void material(inout MaterialInputs material) {
|
|
prepareMaterial(material);
|
|
material.baseColor.rgb = materialParams.baseColor * materialParams.alpha;
|
|
material.baseColor.a = materialParams.alpha;
|
|
material.roughness = materialParams.roughness;
|
|
material.metallic = materialParams.metallic;
|
|
material.sheenColor = materialParams.sheenColor;
|
|
material.sheenRoughness = materialParams.sheenRoughness;
|
|
material.clearCoat = materialParams.clearCoat;
|
|
material.clearCoatRoughness = materialParams.clearCoatRoughness;
|
|
material.anisotropy = materialParams.anisotropy;
|
|
material.absorption = materialParams.absorption;
|
|
material.thickness = materialParams.thickness;
|
|
material.ior = materialParams.ior;
|
|
material.transmission = materialParams.transmission;
|
|
material.emissive = materialParams.emissive;
|
|
}
|
|
}
|