Pygame Normal Maps Test

preview_player
Показать описание
I implemented normal maps into pygame.

The method I used splits the normal map into 4 images, one for each cardinal direction (up, down, left, right), then does the same for the light.

Then I multiply each normal image with the opposing normal image for the light.

So the down normal gets multiplied by the up normal of the light. Then the top normal with the bottom normal of the light, and the same for the left and right directions.

After that, the normals are added to the lighting layer and multiplied to the main image.
Рекомендации по теме