Книга: DirectX 8 Programming Tutorial
Scaling makes your object darker?
Scaling makes your object darker?
One extra thing to note is that if you scale the mesh you will also scale the normals. This will have the effect of making the object darker the more it is scaled. To fix this problem we need to enable the D3DRS_NORMALIZENORMALS render state. This is done with one call to the SetRenderState function as shown below.
m_pD3DDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE);
For this tutorial we will create three spaceships and rotate them each about a different axis. The final scene when rendered will look something like the screenshot below:
Похожие страницы
- Object Orientation
- Protecting Your Machine
- Planning Your Fedora Deployment
- 13. Document Object Model
- 16. Object Reorientation: Generic Functions
- 17. Object Reorientation: Classes
- 6.10. Методы класса Object
- Exercising Your Control
- Chapter 12. Debugging your scripts
- Listing your active rule-set
- Updating and flushing your tables
- How to use this License for your documents