3d - generating perpendicular normals from 8-point cube -
i think i'm being dumb right can't seem think of nice way this:
basically creating load of cubes in directx , using vertexpositioncolor store data. store cubes efficiently i'm storing 8 points per cube. thing though, want normal of each face point away such front face's normal (0, 0, 1) , face's normal (0, 0, -1).
my problem working out how efficiently 8-point cubes. know 24-point cube representation seems inefficient memory point-of-view.
any ideas how can this? preferably in shader or efficient?
thanks
you can use indecies save memory, 8x4 floats + 4*6 ints each side, 56*4 bytes instead of 96*4 bytes, can do, unless points shared between cubes.
Comments
Post a Comment