Sign in to follow this  
Freakdesign

Mesh darkens when scaling bigger

Recommended Posts

Hi all in my actual gameproject i stumbled in a strange Problem: say i create a mesh and render it without any modifications. I get what i exepected: my mesh with colors and textures and all material options (like transparency). now i scale this mesh bigger and bigger see what i get: Screenie you see the mesh darkens until it is black as the big black hole in the middle of the milkyway. where is the trick? why darkens my mesh, or is it a bug? ;) thx for any answer.... Freakdesign

Share this post


Link to post
Share on other sites
Great! it works perfectly.
thats it!
Thx for the fast help Aldenar.

i setted it in the beginscene() - endscene() sequence. it seems to slow my engine a bit. is it performance expensive?
i guess i need a table of all renderstates with their costs to speed ;)

Share this post


Link to post
Share on other sites
Yeah, there is an extra cost when using this render state. Actually, what it does is it re-normalize all normals that are transformed. This is mandatory when your world transform has scaling in it, but you don't need it when rotations and translations only are applied. I think it may be good to turn it on only when rendering a scaled object so you won't decrease the speed of the entire rendering process.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this