I have been coding a 3D viewer for the past few days, and for some reasons, I can't use webgl, I would like to know if there are ways to simulate surface shading in html5 canvas.
Basically, I'll be fetching face data from .obj
files and constructing face by making polygons out of them, ie connecting four lines and filling them. I don't know if there are any interpolation functions that would let me treat each point like a vertex?
question from:
https://stackoverflow.com/questions/65871479/ways-to-simulate-lighting-in-html-canvas 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…