Skip to content

Commit 175a7c2

Browse files
committed
imrpoves material constructor
1 parent 9dc1876 commit 175a7c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OpenTK-PathTracer/src/Material.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public Material(Vector3 albedo, Vector3 emissiv, Vector3 refractionColor, float
2323
Albedo = albedo;
2424
Emissiv = emissiv;
2525
AbsorbanceColor = refractionColor;
26-
SpecularChance = Math.Clamp(specularChance, 0, 1.0f - RefractionChance);
26+
SpecularChance = Math.Clamp(specularChance, 0.0f, 1.0f);
2727
SpecularRoughness = specularRoughness;
2828
IOR = Math.Max(indexOfRefraction, 1.0f);
29-
RefractionChance = Math.Clamp(refractionChance, 0, 1.0f - SpecularChance);
29+
RefractionChance = Math.Clamp(refractionChance, 0.0f, 1.0f - SpecularChance);
3030
RefractionRoughnes = refractionRoughnes;
3131
}
3232

0 commit comments

Comments
 (0)