Model Outline #2327
Unanswered
pusia1
asked this question in
Support Q&A
Model Outline
#2327
Replies: 1 comment 1 reply
-
Does your code work with a normal OSG model? (outside of osgEarth?) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want show osgEarth::ModelNode Outline.
I tried like this.
but did not apply.
`
m_rpModelNode = new osgEarth::ModelNode(pMapNode, style);
const char* VS =
"#version 330 compatibility \n"
"uniform float outlineWidth; \n"
"void main()"
"{ \n"
" vec4 clip = gl_ModelViewProjectionMatrix * gl_Vertex; \n"
" vec3 normal = normalize(gl_NormalMatrix * gl_Normal); \n"
" normal.x *= gl_ProjectionMatrix[0][0]; \n"
" normal.y *= gl_ProjectionMatrix[1][1]; \n"
" clip.xy += normal.xy * clip.w * outlineWidth;\n"
" gl_Position = clip; \n"
"} \n";
`
How can I Show Model Outline?
osg version 3.6.0
osgEarth version 3.4
Beta Was this translation helpful? Give feedback.
All reactions