xml3d / xml3d.js

The WebGL/JS implementation of XML3D
Other
75 stars 25 forks source link

Previously opaque materials with an opacity override are still rendered opaque #170

Closed csvurt closed 8 years ago

csvurt commented 8 years ago
<group material="#material_opaque">
  <mesh src="#mySimpleMesh">
     <float name="opacity">0.1</float>
   </mesh>
</group>

If #material_opaque was not marked as transparent before (opacity = 1) then the opacity override will be applied during rendering but the object won't be put into the transparent objects queue. As a result it's rendered without blending enabled.

Overriding the opacity value of an object that was already transparent (ie opacity = 0.5) works as expected.