New answers tagged

1

BTW, I ended up solving this using a lightmap. My process was as follows: Generate a UV map for the mesh by packing all the triangles together using a simple scanline algorithm. Render the scene directly to the UV map instead of to the screen. This way, pixels are 1:1 related to texels. Render the scene again to the screen, this time using the generated UV ...


1

I am also looking for some code to make this conversion but..Only God knows why the code above is using that array indexes lol... Maybe he meant something like this? (in case other people wants to use the code too) PVector [] tUV = new PVector[3]; // 2d uv coordinates of the triangle vertices PVector [] t3D = new PVector[3]; // 3d space ...



Top 50 recent answers are included