-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of rendering multiple channels #35
Comments
For now you need to do it in multiple separate calls, with three or one channels each time, as in the samples. In principle, it is possible to change the renderer code to support arbitrarily-many channels in a single call, and this should be faster than using multiple calls. However, it requires a bit of work, as OpenGL is designed mainly to render three-channel (RGB) images. The fiddly OpenGL aspects are:
Then you'd also have to deal with the relevant book-keeping in setting up the output tensors, passing the additional vertex and background channels in, and including them in the gradient calculation. |
Thanks for the quick response! Many thanks, |
I don't plan to do it in the near future, given that one can achieve the same with multiple calls. However, I'm happy to help if you're interested in working on it. I should also warn you that the gradient calculation in the texturing sample gives inaccurate results along edges where one face occludes another (it should be correct on silhouette edges where a face occludes the background). Solving that problem may impact how the multi-channel implementation has to work (it may mean the deferred shading pass has to be more tightly linked to the rasterise op). I'll think about this properly when I have time, and get back to you. |
No problem as long as I could get some help from you. |
Note that c04ec96 adds support for rendering with arbitrary numbers of channels, but only in the python frontend (i.e. it still uses a loop over multiple calls to the More importantly, 47185ce adds new functions |
Hi,
Thanks a lot for open sourcing the project, it is awesome!
After a few tries, it seems that the current rasterise function only supports 1 or 3 channels, I wonder if it is possible to rasterise more channels? For example, rasterizing texture and normals together without calling them separately.
I could also modify the codes myself, if you can kindly show me which part to change.
Many thanks,
Shiyang
The text was updated successfully, but these errors were encountered: