You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying this for hours and it is time to ask around. I am trying to subclass ScenegraphLayer to render models with two extra features:
apply a color filter to the rendered model (no problem here)
add an outline around the model, with width/color configurable
The latter is proving difficult. I think the idea is to render models in two passes: the first pass renders an inflated version of the model, painted in the outline color. "inflated" and not scaled/sized up so it really look like an outline and not a shadow - if I am right, that part requires to inject vs:DECKGL_FILTER_GL_POSITION and displace vertices along normals.
That is (I think) what I am doing wrong: both passes always draw models with the exact same size (verified when applying different colors and commenting out either pass in the draw method), so the outline is not shown.
This is while using deckgl 9.0.
I hope this makes sense - would love to know if there's an other approach to solving this, otherwise this can probably be solved by fixing the vs:DECKGL_FILTER_GL_POSITION hook.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I've been trying this for hours and it is time to ask around. I am trying to subclass
ScenegraphLayer
to render models with two extra features:The latter is proving difficult. I think the idea is to render models in two passes: the first pass renders an inflated version of the model, painted in the outline color. "inflated" and not scaled/sized up so it really look like an outline and not a shadow - if I am right, that part requires to inject
vs:DECKGL_FILTER_GL_POSITION
and displace vertices along normals.That is (I think) what I am doing wrong: both passes always draw models with the exact same size (verified when applying different colors and commenting out either pass in the
draw
method), so the outline is not shown.This is while using deckgl 9.0.
I hope this makes sense - would love to know if there's an other approach to solving this, otherwise this can probably be solved by fixing the
vs:DECKGL_FILTER_GL_POSITION
hook.Here's an sandbox in hopes it helps.
I could only troubleshoot by commenting/uncommenting
vs:DECKGL_FILTER_GL_POSITION
and the line 122,model.draw(renderPass);
, in OutlineLayer.ts.Appreciate any help on this!
Beta Was this translation helpful? Give feedback.
All reactions