Skip to content

Commit

Permalink
imrpoves material constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
BoyBaykiller committed Dec 26, 2021
1 parent 9dc1876 commit 175a7c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenTK-PathTracer/src/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public Material(Vector3 albedo, Vector3 emissiv, Vector3 refractionColor, float
Albedo = albedo;
Emissiv = emissiv;
AbsorbanceColor = refractionColor;
SpecularChance = Math.Clamp(specularChance, 0, 1.0f - RefractionChance);
SpecularChance = Math.Clamp(specularChance, 0.0f, 1.0f);
SpecularRoughness = specularRoughness;
IOR = Math.Max(indexOfRefraction, 1.0f);
RefractionChance = Math.Clamp(refractionChance, 0, 1.0f - SpecularChance);
RefractionChance = Math.Clamp(refractionChance, 0.0f, 1.0f - SpecularChance);
RefractionRoughnes = refractionRoughnes;
}

Expand Down

0 comments on commit 175a7c2

Please sign in to comment.