getRoughness top-level property

dynamic getRoughness
getter/setter pair

Implementation

var getRoughness = ShaderNode((inputs) {
  var roughness = inputs.roughness;

  var geometryRoughness = getGeometryRoughness();

  var roughnessFactor = max(roughness,
      0.0525); // 0.0525 corresponds to the base mip of a 256 cubemap.
  roughnessFactor = add(roughnessFactor, geometryRoughness);
  roughnessFactor = min(roughnessFactor, 1.0);

  return roughnessFactor;
});