I don't think I understand your question here - however - I'm largely following a tutorial for the algorithm (https://permadi.com/1996/05/ray-casting ... -contents/). My worst case count is 5 multiplies per column (one of which is fish eye correction) and one "divide" that's just lookup table.
The texture was a quick "lets see what it looks like". Vertically I know the column height so there's a lookup table of the step size needed for the texture. Horizontally the texture column is chosen based on where we hit the relevant grid square (which are 64 units wide meaning my 16x16 texture maps easily - double width pixels for speed of plotting). The problem at the moment is that the actual drawing of the texture can take a significant amount of time because in the worst case the entire render area needs to be texture mapped. I haven't - as yet - spent any time optimising that write. There are some changes I want to make to the geometry calculation first.
The texture was a quick "lets see what it looks like". Vertically I know the column height so there's a lookup table of the step size needed for the texture. Horizontally the texture column is chosen based on where we hit the relevant grid square (which are 64 units wide meaning my 16x16 texture maps easily - double width pixels for speed of plotting). The problem at the moment is that the actual drawing of the texture can take a significant amount of time because in the worst case the entire render area needs to be texture mapped. I haven't - as yet - spent any time optimising that write. There are some changes I want to make to the geometry calculation first.
Statistics: Posted by ChrisB — Sat Feb 15, 2025 11:25 pm