mmatl / pyrender

Easy-to-use glTF 2.0-compliant OpenGL renderer for visualization of 3D scenes.
http://pyrender.readthedocs.io/
MIT License
1.31k stars 225 forks source link

Face id at each pixel #286

Open gtangg11 opened 5 months ago

gtangg11 commented 5 months ago

Hey, great repo. Is it possible to modify renderer + add a shader that computes the face id rendered at each pixel? This functionally would make life a lot easier for many downstream applications and allow us to map face metadata to pixel.

I see this is possible for many attributes of primitive already: https://github.com/mmatl/pyrender/blob/a59963ef890891656fd17c90e12d663233dcaa99/pyrender/renderer.py#L929