Pergunta

I'm loading a large coloured point cloud into OpenSceneGraph using a Vec4Array for per vertex for colors. This is very memory inefficient, requiring 16 bytes of color information per vertex where I'd like to store 4 or less. The datasets I'm dealing with are huge so this is a significant problem.

Is there any way I can get OpenSceneGraph to use lower resolution colouring (e.g. 24 bits of color is more than adequate)?

Foi útil?

Solução

You could possibly use Vertex attributes and a shader to encode XYZ and color into as few bits as you want, and then decode them back out in the shader. But other than that OpenGL (and OSG) doesn't really give you a lot of flexibility.

A lot of game architectures (consoles and mobile devices use a 16-bit 5-6-5 RGB bit coding scheme.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top