Spherical Impostors in three.js

强颜欢笑 提交于 2020-01-15 11:26:10

问题


I'm working to port a native OpenGL application to WebGL by using the three.js framework. I'm stumbling on the implementation of spherical impostors.

Spherical Impostors are basically quads (or two triangles) that are rendered in a way that they always face the camera (much alike billboards).

By employing custom vertex and fragment shaders, for every point on the rendered quad, a new position and normal are generated in a way that emulates a sphere. For a more detailed description you can check out the following link: [link broken]

What is a possible strategy to port this feature in Three.js?


回答1:


THREE.Sprite are spherical impostors. http://threejs.org/examples/#webgl_sprites

Edit: I clearly didn't have a proper understanding of what spherical impostors are. Please, disregard this answer. We haven't implemented those yet.



来源:https://stackoverflow.com/questions/26152053/spherical-impostors-in-three-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!