This took a while, but I successfully added texture rendering to walls, alongside solid roof and floor colors.
To do this, I created my own MapTexture class which extracted pixel data from a loaded image.For each ray that fired, its final hit position was mapped to a specific pixel from that texture. (using some row and column calcuations)
Some things I also did:
- Added support for multiple wall types
- Added noclip toggle, zooming in/out controls
- Optimized shading calculations for walls
- Fixed raycasting bug dealing with negative coordinates
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.