Skip to content

Commit 5fc7b55

Browse files
committed
Update comments
1 parent a4de3b3 commit 5fc7b55

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

example/materialDatabase.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,14 @@ function applyMaterialInfo( info, material ) {
149149

150150
if ( material.transmission ) {
151151

152-
if ( info.color ) material.attenuationColor.setRGB( ...info.color );
152+
if ( info.color ) {
153+
154+
material.attenuationColor.setRGB( ...info.color );
155+
156+
}
157+
158+
// Blender uses 1 / density when exporting volume transmission which doesn't look
159+
// exactly right. But because the scene is 1000x in size we multiply by 1000 here.
153160
material.attenuationDistance = 1000 / info.density;
154161

155162
} else {

0 commit comments

Comments
 (0)