xeolabs / xeogl

A WebGL-based 3D engine for technical visualization. Not actively maintained.
http://xeogl.org
Other
1.14k stars 264 forks source link

clarity of the xeogl glass is not ideal #198

Closed yoyomule closed 7 years ago

yoyomule commented 7 years ago
Description of the problem

I compared the glass and threejs of the xeogl system. The clarity of the xeogl glass is not ideal. Do I need to make some adjustments? ...

vianney_house_2.zip xeogl threejsgtlfviewer

xeolabs commented 7 years ago

The reason is that xeogl and THREE just use different WebGL blend functions. xeogl was using gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA) while THREE uses gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);.

There are advantages and disadvantages with each, but for now, I have changed xeogl to use the same function as THREE.js, since it seems to be the best for rendering windows like these.

Fix confirmed with this example:

http://xeogl.org/examples/#featured_VianneyHouse2

screenshot from 2017-09-12 08-46-01

Going forward, I will see if I can make that configurable.