Re: [osg-users] Render normal vectors to image

2019-11-11 Thread Yu Qi
Hi, I think u must use shader to achieve it. u can bind regular color buffer,but using gl_FragColor.rgb = normal.xyz in fragment shader. the fallback is that you need to render the Node twice. OSG support this way. If you're familiar with OpenGL4.x,you can use GL_COLOR_ATTACHMENT_i Frame

Re: [osg-users] Huge perfomance issues

2019-05-31 Thread Yu Qi
Hi, By the way,the default vertex specification of geometry is displaylist,if you need to change vertex frequently,use VAO and VBO. Thank you! Cheers, Yu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76167#76167

Re: [osg-users] override the texture with the gl_fragColor of fragment shader and save it

2019-04-14 Thread Yu Qi
Hi, I seem to get the hint. In OpenGL Referenceļ¼Œthe Image Load Store and Shader Storage Buffer(SSBO) support it. Thank you! Cheers, Yu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75834#75834

[osg-users] override the texture with the gl_fragColor of fragment shader and save it

2019-04-14 Thread Yu Qi
Hi, Is it possible to override the texture with the gl_fragColor of fragment shader and save it to disk? For example, The shadow of static Model.In 3dmax,The shadow 's render to second texture with new texture coordinate.and then,re-blend the textures when using. I have no hint about this

Re: [osg-users] culling / bounding calculation for shader scaled geometries

2019-03-28 Thread Yu Qi
Hi, the init boundbox will be recomputed in many node's ComputeBound method,so it don't work. if possible,you can rewrite the ComputeBound() method.Or,I think osg::Node::ComputeBoundCallback can help you out,but I'm not sure whether the ComputeBound method which your texture item 's node use