我有点难过.
在我的数据库中,我有这样的关系:
(u:User)-[r1:LISTENS_TO]->(a:Artist)<-[r2:LISTENS_TO]-(u2:User)
Run Code Online (Sandbox Code Playgroud)
我想执行一个查询,对于给定的用户,我找到该用户和每个其他用户之间的常见艺术家.
为了了解我的数据库的大小,我有大约600个用户,47,546位艺术家,以及184,211用户和艺术家之间的关系.
我尝试的第一个查询如下:
START me=node(553314), other=node:userLocations("withinDistance:[38.89037,-77.03196,80.467]")
OPTIONAL MATCH
pMutualArtists=(me:User)-[ar1:LISTENS_TO]->(a:Artist)<-[ar2:LISTENS_TO]-(other:User)
WHERE
other:User
WITH other, COUNT(DISTINCT pMutualArtists) AS mutualArtists
ORDER BY mutualArtists DESC
LIMIT 10
RETURN other.username, mutualArtists
Run Code Online (Sandbox Code Playgroud)
这需要大约20秒才能返回.此查询的配置文件如下:
+----------------------+-------+--------+------------------------+------------------------------------------------------------------------------------------------+
| Operator | Rows | DbHits | Identifiers | Other |
+----------------------+-------+--------+------------------------+------------------------------------------------------------------------------------------------+
| ColumnFilter(0) | 10 | 0 | | keep columns other.username, mutualArtists |
| Extract | 10 | 20 | | other.username |
| ColumnFilter(1) | 10 | 0 | | keep columns other, mutualArtists |
| …Run Code Online (Sandbox Code Playgroud) 我坚持这个问题,一直在研究它,并研究它几个小时.
我正在尝试渲染我的场景,使用EffectComposer,这样我的背景对象就没有SSAO(在我的真实项目中,它是一个程序城市)和我的前景对象(在我的真实项目中我想要调用的两个建筑物) out和有不同的材料)有SSAO.
正如您在下面的小提琴中看到的那样,蓝色立方体(它是bg场景的一部分)由红色立方体的SSAO渲染(在FG场景中)覆盖.显然,这种效果是不可取的.
如何让它正常工作?
谢谢!
-亚当
http://jsfiddle.net/Lbddvnsp/1/
var renderTargetParameters, renderTarget, renderBackground, renderModel, clearMask, renderMask, depthMaterial, depthTarget, composer;
var container, camera, bgScene, fgScene, renderer;
init();
initSSAO();
addObjects();
animate();
function initSSAO() {
// Depth
var depthShader = THREE.ShaderLib[ "depthRGBA" ];
var depthUniforms = THREE.UniformsUtils.clone( depthShader.uniforms );
depthMaterial = new THREE.ShaderMaterial( { fragmentShader: depthShader.fragmentShader, vertexShader: depthShader.vertexShader, uniforms: depthUniforms } );
depthMaterial.blending = THREE.NoBlending;
// Post-processing
// create a custom render target with a stencil buffer
// the stencil buffer allows for masking …Run Code Online (Sandbox Code Playgroud)