mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously supported scattering model. All new parameters are available via 'vbsdf' command. Location of new sample for few material examples: samples\tcl\pathtrace_materials.tcl Fix shader compilation issue. Fix test case sample_ball_alpha. Shaders_PathtraceBase_fs.pxx - regenerate resource from origin
This commit is contained in:
@@ -27,7 +27,7 @@ Graphic3d_Vec4 Graphic3d_Fresnel::Serialize() const
|
||||
|
||||
if (myFresnelType != Graphic3d_FM_SCHLICK)
|
||||
{
|
||||
aData.x() = -static_cast<Standard_ShortReal> (myFresnelType);
|
||||
aData.x() = -static_cast<float> (myFresnelType);
|
||||
}
|
||||
|
||||
return aData;
|
||||
@@ -37,8 +37,8 @@ Graphic3d_Vec4 Graphic3d_Fresnel::Serialize() const
|
||||
// function : fresnelNormal
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
inline Standard_ShortReal fresnelNormal (Standard_ShortReal theN,
|
||||
Standard_ShortReal theK)
|
||||
inline float fresnelNormal (float theN,
|
||||
float theK)
|
||||
{
|
||||
return ((theN - 1.f) * (theN - 1.f) + theK * theK) /
|
||||
((theN + 1.f) * (theN + 1.f) + theK * theK);
|
||||
@@ -51,10 +51,37 @@ inline Standard_ShortReal fresnelNormal (Standard_ShortReal theN,
|
||||
Graphic3d_Fresnel Graphic3d_Fresnel::CreateConductor (const Graphic3d_Vec3& theRefractionIndex,
|
||||
const Graphic3d_Vec3& theAbsorptionIndex)
|
||||
{
|
||||
return Graphic3d_Fresnel (Graphic3d_FM_SCHLICK,
|
||||
Graphic3d_Vec3 (fresnelNormal (theRefractionIndex.x(), theAbsorptionIndex.x()),
|
||||
fresnelNormal (theRefractionIndex.y(), theAbsorptionIndex.y()),
|
||||
fresnelNormal (theRefractionIndex.z(), theAbsorptionIndex.z())));
|
||||
const Graphic3d_Vec3 aFresnel (fresnelNormal (theRefractionIndex.x(), theAbsorptionIndex.x()),
|
||||
fresnelNormal (theRefractionIndex.y(), theAbsorptionIndex.y()),
|
||||
fresnelNormal (theRefractionIndex.z(), theAbsorptionIndex.z()));
|
||||
|
||||
return Graphic3d_Fresnel (Graphic3d_FM_SCHLICK, aFresnel);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Graphic3d_BSDF
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Graphic3d_BSDF::Graphic3d_BSDF()
|
||||
{
|
||||
FresnelCoat = Graphic3d_Fresnel::CreateConstant (0.f);
|
||||
FresnelBase = Graphic3d_Fresnel::CreateConstant (1.f);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : operator==
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
bool Graphic3d_BSDF::operator== (const Graphic3d_BSDF& theOther) const
|
||||
{
|
||||
return Kc == theOther.Kc
|
||||
&& Kd == theOther.Kd
|
||||
&& Kt == theOther.Kt
|
||||
&& Ks == theOther.Ks
|
||||
&& Le == theOther.Le
|
||||
&& Absorption == theOther.Absorption
|
||||
&& FresnelCoat == theOther.FresnelCoat
|
||||
&& FresnelBase == theOther.FresnelBase;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -63,16 +90,21 @@ Graphic3d_Fresnel Graphic3d_Fresnel::CreateConductor (const Graphic3d_Vec3& theR
|
||||
// =======================================================================
|
||||
void Graphic3d_BSDF::Normalize()
|
||||
{
|
||||
Standard_ShortReal aMax = std::max (Kd.x() + Ks.x() + Kr.x() + Kt.x(),
|
||||
std::max (Kd.y() + Ks.y() + Kr.y() + Kt.y(),
|
||||
Kd.z() + Ks.z() + Kr.z() + Kt.z()));
|
||||
float aMax = 0.f;
|
||||
|
||||
for (int aChannelID = 0; aChannelID < 3; ++aChannelID)
|
||||
{
|
||||
aMax = std::max (aMax, Kd[aChannelID] + Ks[aChannelID] + Kt[aChannelID]);
|
||||
}
|
||||
|
||||
if (aMax > 1.f)
|
||||
{
|
||||
Kd /= aMax;
|
||||
Ks /= aMax;
|
||||
Kr /= aMax;
|
||||
Ks /= aMax;
|
||||
for (int aChannelID = 0; aChannelID < 3; ++aChannelID)
|
||||
{
|
||||
Kd[aChannelID] /= aMax;
|
||||
Ks[aChannelID] /= aMax;
|
||||
Kt[aChannelID] /= aMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,26 +125,15 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateDiffuse (const Graphic3d_Vec3& theWeight)
|
||||
// function : CreateMetallic
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic (const Graphic3d_Vec3& theWeight,
|
||||
const Graphic3d_Fresnel& theFresnel,
|
||||
const Standard_ShortReal theRoughness)
|
||||
Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic (const Graphic3d_Vec3& theWeight, const Graphic3d_Fresnel& theFresnel, const float theRoughness)
|
||||
{
|
||||
Graphic3d_BSDF aBSDF;
|
||||
|
||||
aBSDF.Roughness = theRoughness;
|
||||
aBSDF.FresnelBase = theFresnel;
|
||||
|
||||
// Selecting between specular and glossy
|
||||
// BRDF depending on the given roughness
|
||||
if (aBSDF.Roughness > 0.f)
|
||||
{
|
||||
aBSDF.Ks = theWeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
aBSDF.Kr = theWeight;
|
||||
}
|
||||
|
||||
aBSDF.Fresnel = theFresnel;
|
||||
aBSDF.Ks = Graphic3d_Vec4 (theWeight, theRoughness);
|
||||
|
||||
return aBSDF;
|
||||
}
|
||||
@@ -121,18 +142,25 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateMetallic (const Graphic3d_Vec3& theWeigh
|
||||
// function : CreateTransparent
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent (const Graphic3d_Vec3& theWeight,
|
||||
const Graphic3d_Vec3& theAbsorptionColor,
|
||||
const Standard_ShortReal theAbsorptionCoeff)
|
||||
Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent (const Graphic3d_Vec3& theWeight,
|
||||
const Graphic3d_Vec3& theAbsorptionColor,
|
||||
const float theAbsorptionCoeff)
|
||||
{
|
||||
Graphic3d_BSDF aBSDF;
|
||||
|
||||
// Create Fresnel parameters for the coat layer;
|
||||
// set it to 0 value to simulate ideal refractor
|
||||
aBSDF.FresnelCoat = Graphic3d_Fresnel::CreateConstant (0.f);
|
||||
|
||||
aBSDF.Kt = theWeight;
|
||||
|
||||
aBSDF.AbsorptionColor = theAbsorptionColor;
|
||||
aBSDF.AbsorptionCoeff = theAbsorptionCoeff;
|
||||
// Link reflection and transmission coefficients
|
||||
aBSDF.Kc.r() = aBSDF.Kt.r();
|
||||
aBSDF.Kc.g() = aBSDF.Kt.g();
|
||||
aBSDF.Kc.b() = aBSDF.Kt.b();
|
||||
|
||||
aBSDF.Fresnel = Graphic3d_Fresnel::CreateConstant (0.f);
|
||||
aBSDF.Absorption = Graphic3d_Vec4 (theAbsorptionColor,
|
||||
theAbsorptionCoeff);
|
||||
|
||||
return aBSDF;
|
||||
}
|
||||
@@ -141,19 +169,24 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateTransparent (const Graphic3d_Vec3& theWe
|
||||
// function : CreateGlass
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Graphic3d_BSDF Graphic3d_BSDF::CreateGlass (const Graphic3d_Vec3& theWeight,
|
||||
const Graphic3d_Vec3& theAbsorptionColor,
|
||||
const Standard_ShortReal theAbsorptionCoeff,
|
||||
const Standard_ShortReal theRefractionIndex)
|
||||
Graphic3d_BSDF Graphic3d_BSDF::CreateGlass (const Graphic3d_Vec3& theWeight,
|
||||
const Graphic3d_Vec3& theAbsorptionColor,
|
||||
const float theAbsorptionCoeff,
|
||||
const float theRefractionIndex)
|
||||
{
|
||||
Graphic3d_BSDF aBSDF;
|
||||
|
||||
// Create Fresnel parameters for the coat layer
|
||||
aBSDF.FresnelCoat = Graphic3d_Fresnel::CreateDielectric (theRefractionIndex);
|
||||
|
||||
aBSDF.Kt = theWeight;
|
||||
|
||||
aBSDF.AbsorptionColor = theAbsorptionColor;
|
||||
aBSDF.AbsorptionCoeff = theAbsorptionCoeff;
|
||||
aBSDF.Kc.r() = aBSDF.Kt.r();
|
||||
aBSDF.Kc.g() = aBSDF.Kt.g();
|
||||
aBSDF.Kc.b() = aBSDF.Kt.b();
|
||||
|
||||
aBSDF.Fresnel = Graphic3d_Fresnel::CreateDielectric (theRefractionIndex);
|
||||
aBSDF.Absorption = Graphic3d_Vec4 (theAbsorptionColor,
|
||||
theAbsorptionCoeff);
|
||||
|
||||
return aBSDF;
|
||||
}
|
@@ -34,8 +34,7 @@ class Graphic3d_Fresnel
|
||||
public:
|
||||
|
||||
//! Creates uninitialized Fresnel factor.
|
||||
Graphic3d_Fresnel()
|
||||
: myFresnelType (Graphic3d_FM_CONSTANT)
|
||||
Graphic3d_Fresnel() : myFresnelType (Graphic3d_FM_CONSTANT)
|
||||
{
|
||||
// ideal specular reflector
|
||||
myFresnelData = Graphic3d_Vec3 (0.f, 1.f, 0.f);
|
||||
@@ -111,36 +110,39 @@ private:
|
||||
//! for physically-based rendering (in path tracing engine). BSDF is represented as
|
||||
//! weighted mixture of basic BRDFs/BTDFs (Bidirectional Reflectance (Transmittance)
|
||||
//! Distribution Functions).
|
||||
//!
|
||||
//! NOTE: OCCT uses two-layer material model. We have base diffuse, glossy, or transmissive
|
||||
//! layer, covered by one glossy/specular coat. In the current model, the layers themselves
|
||||
//! have no thickness; they can simply reflect light or transmits it to the layer under it.
|
||||
//! We use actual BRDF model only for direct reflection by the coat layer. For transmission
|
||||
//! through this layer, we approximate it as a flat specular surface.
|
||||
class Graphic3d_BSDF
|
||||
{
|
||||
public:
|
||||
|
||||
//! Weight of the Lambertian BRDF.
|
||||
//! Weight of coat specular/glossy BRDF.
|
||||
Graphic3d_Vec4 Kc;
|
||||
|
||||
//! Weight of base diffuse BRDF.
|
||||
Graphic3d_Vec3 Kd;
|
||||
|
||||
//! Weight of the reflection BRDF.
|
||||
Graphic3d_Vec3 Kr;
|
||||
//! Weight of base specular/glossy BRDF.
|
||||
Graphic3d_Vec4 Ks;
|
||||
|
||||
//! Weight of the transmission BTDF.
|
||||
//! Weight of base specular/glossy BTDF.
|
||||
Graphic3d_Vec3 Kt;
|
||||
|
||||
//! Weight of the Blinn's glossy BRDF.
|
||||
Graphic3d_Vec3 Ks;
|
||||
|
||||
//! Self-emitted radiance.
|
||||
//! Radiance emitted by the surface.
|
||||
Graphic3d_Vec3 Le;
|
||||
|
||||
//! Parameters of Fresnel reflectance.
|
||||
Graphic3d_Fresnel Fresnel;
|
||||
//! Volume scattering color/density.
|
||||
Graphic3d_Vec4 Absorption;
|
||||
|
||||
//! Roughness (exponent) of Blinn's BRDF.
|
||||
Standard_ShortReal Roughness;
|
||||
//! Parameters of Fresnel reflectance of coat layer.
|
||||
Graphic3d_Fresnel FresnelCoat;
|
||||
|
||||
//! Absorption color of transparent media.
|
||||
Graphic3d_Vec3 AbsorptionColor;
|
||||
|
||||
//! Absorption intensity of transparent media.
|
||||
Standard_ShortReal AbsorptionCoeff;
|
||||
//! Parameters of Fresnel reflectance of base layer.
|
||||
Graphic3d_Fresnel FresnelBase;
|
||||
|
||||
public:
|
||||
|
||||
@@ -170,39 +172,13 @@ public:
|
||||
public:
|
||||
|
||||
//! Creates uninitialized BSDF.
|
||||
Graphic3d_BSDF() : Roughness (1.f), AbsorptionCoeff (0.f)
|
||||
{
|
||||
Fresnel = Graphic3d_Fresnel::CreateConstant (1.f);
|
||||
}
|
||||
Standard_EXPORT Graphic3d_BSDF();
|
||||
|
||||
//! Normalizes BSDF components.
|
||||
Standard_EXPORT void Normalize();
|
||||
|
||||
//! Performs mixing of two BSDFs.
|
||||
Graphic3d_BSDF& operator+ (const Graphic3d_BSDF& theOther)
|
||||
{
|
||||
Kd += theOther.Kd;
|
||||
Kr += theOther.Kr;
|
||||
Kt += theOther.Kt;
|
||||
Ks += theOther.Ks;
|
||||
Le += theOther.Le;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! Performs comparison of two BSDFs.
|
||||
bool operator== (const Graphic3d_BSDF& theOther) const
|
||||
{
|
||||
return Kd == theOther.Kd
|
||||
&& Kr == theOther.Kr
|
||||
&& Kt == theOther.Kt
|
||||
&& Ks == theOther.Ks
|
||||
&& Le == theOther.Le
|
||||
&& Fresnel == theOther.Fresnel
|
||||
&& Roughness == theOther.Roughness
|
||||
&& AbsorptionCoeff == theOther.AbsorptionCoeff
|
||||
&& AbsorptionColor == theOther.AbsorptionColor;
|
||||
}
|
||||
Standard_EXPORT bool operator== (const Graphic3d_BSDF& theOther) const;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -104,10 +104,9 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
ColorCoef[Graphic3d_TOR_DIFFUSE] = 0.24f;
|
||||
ColorCoef[Graphic3d_TOR_SPECULAR] = 0.06f;
|
||||
|
||||
BSDF.Kd = (Graphic3d_Vec3 )Colors[Graphic3d_TOR_DIFFUSE];
|
||||
BSDF.Ks = Graphic3d_Vec3 (0.00784314f, 0.00784314f, 0.00784314f);
|
||||
BSDF.Kd = static_cast<Graphic3d_Vec3> (Colors[Graphic3d_TOR_DIFFUSE]);
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.00784314f, 0.00784314f, 0.00784314f, 0.25f);
|
||||
BSDF.Normalize();
|
||||
BSDF.Roughness = 0.25f;
|
||||
break;
|
||||
case Graphic3d_NOM_SHINY_PLASTIC:
|
||||
Shininess = 1.00f;
|
||||
@@ -115,10 +114,9 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
ColorCoef[Graphic3d_TOR_DIFFUSE] = 0.50f;
|
||||
ColorCoef[Graphic3d_TOR_SPECULAR] = 1.00f;
|
||||
|
||||
BSDF.Kd = (Graphic3d_Vec3 )Colors[Graphic3d_TOR_DIFFUSE];
|
||||
BSDF.Ks = Graphic3d_Vec3 (0.145f, 0.145f, 0.145f);
|
||||
BSDF.Kd = static_cast<Graphic3d_Vec3> (Colors[Graphic3d_TOR_DIFFUSE]);
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.145f, 0.145f, 0.145f, 0.17f);
|
||||
BSDF.Normalize();
|
||||
BSDF.Roughness = 0.17f;
|
||||
break;
|
||||
case Graphic3d_NOM_SATIN:
|
||||
Shininess = 0.09375f;
|
||||
@@ -127,8 +125,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
ColorCoef[Graphic3d_TOR_SPECULAR] = 0.44f;
|
||||
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.2f);
|
||||
BSDF.Ks = Graphic3d_Vec3 (0.6f);
|
||||
BSDF.Roughness = 0.6f;
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.6f);
|
||||
|
||||
break;
|
||||
case Graphic3d_NOM_NEON_GNC:
|
||||
@@ -141,9 +138,9 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
ReflActivity[Graphic3d_TOR_EMISSION] = Standard_True;
|
||||
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.0f);
|
||||
BSDF.Kr = Graphic3d_Vec3 (0.5f);
|
||||
BSDF.Le = (Graphic3d_Vec3 )Colors[Graphic3d_TOR_DIFFUSE];
|
||||
BSDF.Fresnel = Graphic3d_Fresnel::CreateDielectric (1.5f);
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.5f, 0.5f, 0.5f, 0.f);
|
||||
BSDF.Le = static_cast<Graphic3d_Vec3> (Colors[Graphic3d_TOR_DIFFUSE]);
|
||||
BSDF.FresnelBase = Graphic3d_Fresnel::CreateDielectric (1.5f);
|
||||
break;
|
||||
case Graphic3d_NOM_METALIZED:
|
||||
Shininess = 0.13f;
|
||||
@@ -289,7 +286,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.98f, 1.0f, 0.60f));
|
||||
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.243137f, 0.243137f, 0.243137f);
|
||||
BSDF.Ks = Graphic3d_Vec3 (0.00392157f, 0.00392157f, 0.00392157f);
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.00392157f, 0.00392157f, 0.00392157f, 0.5f);
|
||||
|
||||
break;
|
||||
// Ascending Compatibility of physical materials. Takes the same definition as in the next constructor. New materials
|
||||
@@ -341,9 +338,9 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f, 1.0f, 0.46f));
|
||||
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.0f);
|
||||
BSDF.Kr = Graphic3d_Vec3 (0.5f);
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.5f, 0.5f, 0.5f, 0.f);
|
||||
BSDF.Le = Graphic3d_Vec3 (0.0f, 1.0f, 0.46f);
|
||||
BSDF.Fresnel = Graphic3d_Fresnel::CreateDielectric (1.5f);
|
||||
BSDF.FresnelBase = Graphic3d_Fresnel::CreateDielectric (1.5f);
|
||||
break;
|
||||
case Graphic3d_NOM_OBSIDIAN:
|
||||
MaterialType = Graphic3d_MATERIAL_PHYSIC;
|
||||
@@ -358,8 +355,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.333f, 0.329f, 0.346f));
|
||||
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.023f, 0.f, 0.023f);
|
||||
BSDF.Ks = Graphic3d_Vec3 (0.0156863f, 0.0156863f, 0.0156863f);
|
||||
BSDF.Roughness = 0.1f;
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.0156863f, 0.0156863f, 0.0156863f, 0.1f);
|
||||
break;
|
||||
case Graphic3d_NOM_JADE:
|
||||
MaterialType = Graphic3d_MATERIAL_PHYSIC;
|
||||
@@ -373,10 +369,9 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
Colors[Graphic3d_TOR_DIFFUSE] = Quantity_Color (Graphic3d_Vec3 (0.540f, 0.890f, 0.630f));
|
||||
Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.316f, 0.316f, 0.316f));
|
||||
|
||||
BSDF.Fresnel = Graphic3d_Fresnel::CreateDielectric (1.5f);
|
||||
BSDF.FresnelBase = Graphic3d_Fresnel::CreateDielectric (1.5f);
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.208658f, 0.415686f, 0.218401f);
|
||||
BSDF.Ks = Graphic3d_Vec3 (0.611765f, 0.611765f, 0.611765f);
|
||||
BSDF.Roughness = 0.06f;
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.611765f, 0.611765f, 0.611765f, 0.06f);
|
||||
break;
|
||||
case Graphic3d_NOM_CHARCOAL:
|
||||
MaterialType = Graphic3d_MATERIAL_PHYSIC;
|
||||
@@ -391,8 +386,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.000f, 0.000f, 0.000f));
|
||||
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.02f, 0.02f, 0.02f);
|
||||
BSDF.Ks = Graphic3d_Vec3 (0.1f, 0.1f, 0.1f);
|
||||
BSDF.Roughness = 0.3f;
|
||||
BSDF.Ks = Graphic3d_Vec4 (0.1f, 0.1f, 0.1f, 0.3f);
|
||||
break;
|
||||
case Graphic3d_NOM_WATER:
|
||||
MaterialType = Graphic3d_MATERIAL_PHYSIC;
|
||||
@@ -460,7 +454,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
|
||||
|
||||
BSDF.Kd = Graphic3d_Vec3 (0.1f);
|
||||
BSDF.Kt = Graphic3d_Vec3 (0.9f);
|
||||
BSDF.Fresnel = Graphic3d_Fresnel::CreateConstant (0.0f);
|
||||
BSDF.FresnelBase = Graphic3d_Fresnel::CreateConstant (0.0f);
|
||||
TransparencyCoef = 0.80f;
|
||||
|
||||
Colors[Graphic3d_TOR_AMBIENT] = Quantity_Color (Graphic3d_Vec3 (0.550f, 0.550f, 0.550f));
|
||||
|
Reference in New Issue
Block a user