nglviewer / ngl

WebGL protein viewer
http://nglviewer.org/ngl/
MIT License
667 stars 170 forks source link

Can't see other transparent (opacity < 1.0) representations through transparent cartoon structure #199

Closed martingraham closed 8 years ago

martingraham commented 8 years ago

Is this a known issue? When I set the structure (cartoon representation) to less than 1 I can see other parts of the same structure through itself. I can also see other representations through it if they're completely opaque.

However if I reduce the opacity of those representations to <1 they aren't seen through the cartoon representation. I've attached a screenshot (residues and distance reps with opacity 0.9) where they're cut out when they go behind the transparent cartoon rep structure. Squinting, I swear I can see the cartoon structure showing correctly as it goes behind the slightly transparent bonds so the reverse isn't true.

I guess a better description of the problem is "transparent cartoon representation acts as opaque when in front of other transparent representations" screenshot 9

I ask if it's a known issue as it might well just be my graphics card and work fine for others. Firefox won't show anti-aliased fonts because it's that rubbish.

I'll also list these three warnings I always get when I load NGL in case any of these have a bearing on it: ngl_verbose.js:20968 THREE.WebGLRenderer: WEBGL_depth_texture extension not supported. ngl_verbose.js:20968 THREE.WebGLRenderer: OES_texture_float_linear extension not supported. ngl_verbose.js:20968 THREE.WebGLRenderer: WEBGL_color_buffer_float extension not supported.

arose commented 8 years ago

This is a known problem. Transparency is hard for GPUs. You can remove the patterns in the cartoon by setting the parameter side to "front".

arose commented 8 years ago

@martingraham does the workaround help you?

martingraham commented 8 years ago

yes I can get rid of the striping effect in the helix reps with that parameter setting, thanks, martin

arose commented 8 years ago

great