Bram Stolk wrote:

> 
> I hope you don't mind me asking you another question that
> is application-programming related:
> 
> I know that using GL_NORMALIZE or GL_RESCALE_NORMALS causes
> performance-loss.

Rescale shouldn't hurt much, and neither should normalize if the normals
are compiled into a display list.

> Now that you've implemented precompiled vertex arrays, will the
> performance-hit caused by scaling normals be even greater?

If you are using CVA's, and reuse the normal array, perhaps by doing
some sort of multipass rendering, then the normals will only be
transformed once.  I think this is a pretty rare usage - I can't think
of any cases where you would want to do multipass texgen, or multipass
vertex lighting either.

The other benefit from CVA is vertex sharing.  If you can sort your data
(see the isosurf demo for an example) to remove duplicate (vertex +
normal + ...) combinations, then there will be less geometry processing
to do, including fewer normals to transform.


> And is there is performance difference between the two
> with respect to CVA?
> 
> I would really like to use trf matrices with scaling,
> (preferably non-uniform as well) but not if it means a big impact
> on performance.

It will hurt performance in the sense that lighting will be done in eye
space.  Otherwise we can skip the obj->eye transform and do a single
obj->clip, with lighting done in object space. 

The only way you can really know is to measure and profile your
application.

Keith


_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to