Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Our next step similar to last time checks if the current pixel is black, and if not, loads from the second half of the texture page, which would give us the textures we loaded in before, meaning that the solid surface is pulling directly from the texture to load the image outright. 

However this time around the check skips by 16 in the inverse direction the 3D images will be generated, when it finds a a solid surface in that direction, it steps back by 16 texels, records the point to coordTemp2, and sets normal to true, indicating that this pixel will be acting as part of a generated normal map.