cpu rasterisation - lerping vector data

Discussion in 'Spigot Plugin Development' started by darkkir3, May 17, 2016.

  1. Alright, I am currently working on my (cpu) object render-api, which allows to convert meshes into a minecraft world. I got it so far to actually render the objects pretty fast.
    What I am currently doing:
    • For each vertex -> build a face
    • For each face -> build a AABB containing the complete face
    • For each cube/block in the AABB -> do a simple plane/triangle/line in cube test based on the edges and normals of the cube
    Obviously, this method does not allow me to return any information about the interpolated values of the vertices other than the face currently rendered. I got two questions:
    • How would I efficiently implement a system that actually collects the vertex data? I could just convert the plane/triangle to the baricentric coordinate system and calculate the lerped data by weighting the data value of each vertex by its corresponding coordinate. However I am concerned about the performance of this approach
    • Is there is a better way for the rasterisation? If so: which?