Author Topic: ok so go over again why we can only have a tiny amount of lights viewable??  (Read 2058 times)

i STILL DONT UNDERSTAND

explain pls

It's apparently a limitation in OpenGL.

It's apparently a limitation in OpenGL.
wat

there's no way

The OpenGL used in the old rendering method. I don't know exactly why the 'newer' OpenGL (minimum settings and higher) doesn't support it still, but it probably has to do with the clear overlap between the new and old methods.

I thought there was a limit of 7 dynamic lights implanted in the engine?

I thought there was a limit of 7 dynamic lights implanted in the engine?
8. But there's always a sun.

why a limit
the api cant seriously be that weak not to handle more

I'm thinking it has something to do with shaders only allowing that many lights, but i can't remember, I'll go dig around.
It can't be an OpenGL limitation, that would be very weak.

EDIT:
Just as I thought, it is limited by shaders (in line 127 and so on of renderCsm_frag.glsl (line 67 in minimum_frag.glsl))

Code: [Select]
// Point lighting
uniform vec4     pointLightPos0;
uniform vec4   pointLightColor0;
uniform float pointLightRadius0;

uniform vec4     pointLightPos1;
uniform vec4   pointLightColor1;
uniform float pointLightRadius1;
...
« Last Edit: July 17, 2014, 10:32:39 PM by Wrapperup »

the api cant seriously be that weak not to handle more
I don't think that's the right usage of API

I don't think that's the right usage of API
OpenGL is a graphics API.

I don't think that's the right usage of API
Quote
OpenGL (Open Graphics Library) is a cross-language, multi-platform application programming interface (API)
-__________________-

8. But there's always a sun.
Sun.delete();

Oh look. No more sun.

is it possible to change rendering clientsided?

is it possible to change rendering clientsided?
Servers don't render.

OpenGL, with no shaders, can only have up to 8 lights. if you add in shaders you can "add" more lights so to say, but it's a bit trickier. There's probably default global variables in the shader code that correspond to the regular gl lights so it would be easier to control the lights via the API instead of setting uniforms all the time