Книга: 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.


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:

Оглавление книги

Генерация: 0.775. Запросов К БД/Cache: 3 / 0
Вверх Вниз