Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

a "light source" is nothing else than a collection of variables when passed in to the shader. Vector3 for the position, a float for the intensity, Vector3 for the colour and so on. Each one of them can be passed in as a uniform - with OpenGL 3.0 you should be able to pass in at the very least 1024 uniforms, but in most implementations the limit is much higher. So if you were only passing in the position of the light, you should be able to give at least 1024 lights to any shader.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: