Author Topic: badspot y u no increase render distance of lights???  (Read 3638 times)

its quite annoying that nearly 32 blocks away (which is tiny in render distance) all lights stop casting their light on other objects and just have the flare to give an "illusion" that the light is still being rendered

or not being able to see a more than 5~ lights at a time cast their light on something.

why cant someone make a mod where it makes the lights not cut out after 32 blocks and being able to see more than 5~ lights at a time??

engine limitation, i imagine it's taken a backseat behind all the actual issues

render distance seems to be ultra-tiny for me
lights literally pop on as i get beside them and its really weird

why cant someone make a mod where it makes the lights not cut out after 32 blocks and being able to see more than 5~ lights at a time??
5 lights is set up because engine limitations (our engine can support 8 at one time IIRC: one goes for the sun, and the other two i'm not completely sure)

32-brick distance is probably to help alleviate the issue with being able to only see 5 lights, but someone else would know more about this.

5 lights is set up because engine limitations (our engine can support 8 at one time IIRC: one goes for the sun, and the other two i'm not completely sure)

32-brick distance is probably to help alleviate the issue with being able to only see 5 lights, but someone else would know more about this.
Where did you get 5 from? In total its 8 but with the sun then its just 7.

Where did you get 5 from? In total its 8 but with the sun then its just 7.
from the op who's probably complaining after realizing the limit

or not being able to see a more than 5~ lights at a time cast their light on something.


if it was seven i'm pretty sure kimono would be complaining about 7 since its pretty clear that he's complaining because he's going over the set limit, which would mean he'd have more than 5 lights set up but only 5 appear. if the limit was 7 then he'd have more than 7 lights but realize only 7 appear.


or not being able to see a more than 5~ lights at a time cast their light on something.

its 8

Where did you get 5 from? In total its 8 but with the sun then its just 7.

the sun isn't a light

this loving engine lol

it isn't an engine limitation

render distance seems to be ultra-tiny for me
lights literally pop on as i get beside them and its really weird

Render distance is also affected by how many lights you have on in an area. More lights, smaller render distance.
You could just have a bunch of lights in one area.


it isn't an engine limitation

So then why can't we see more then 7 or 8?

So then why can't we see more then 7 or 8?

because of this code:

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

uniform vec4     pointLightPos1;
uniform vec4   pointLightColor1;
uniform float pointLightRadius1;

uniform vec4     pointLightPos2;
uniform vec4   pointLightColor2;
uniform float pointLightRadius2;

uniform vec4     pointLightPos3;
uniform vec4   pointLightColor3;
uniform float pointLightRadius3;

uniform vec4     pointLightPos4;
uniform vec4   pointLightColor4;
uniform float pointLightRadius4;

uniform vec4     pointLightPos5;
uniform vec4   pointLightColor5;
uniform float pointLightRadius5;

uniform vec4     pointLightPos6;
uniform vec4   pointLightColor6;
uniform float pointLightRadius6;

uniform vec4     pointLightPos7;
uniform vec4   pointLightColor7;
uniform float pointLightRadius7;

vec4 accumulatePointLights()
{
   vec4 pointLightTotal = vec4(0.0f, 0.0f, 0.0f, 0.0f);
   vec3 lightDelta = vec3(0.0f, 0.0f, 0.0f);
   float lightDot = 0.0f;
   float ratio = 0.0f;

   // Calculate effects of the 8 point lights.

   lightDelta = worldPos.xyz - pointLightPos0.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius0);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor0.xyz;

   lightDelta = worldPos.xyz - pointLightPos1.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius1);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor1.xyz;

   lightDelta = worldPos.xyz - pointLightPos2.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius2);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor2.xyz;

   lightDelta = worldPos.xyz - pointLightPos3.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius3);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor3.xyz;

   lightDelta = worldPos.xyz - pointLightPos4.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius4);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor4.xyz;

   lightDelta = worldPos.xyz - pointLightPos5.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius5);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor5.xyz;

   lightDelta = worldPos.xyz - pointLightPos6.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius6);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor6.xyz;

   lightDelta = worldPos.xyz - pointLightPos7.xyz;
   lightDot = max(dot(-normalize(lightDelta), worldNormal), 0.0f);
   ratio = 1.0f - (length(lightDelta) / pointLightRadius7);
   ratio = ratio * ratio * ratio * 0.4f;
   ratio = max(ratio, 0.0f);
   pointLightTotal.xyz += ratio * lightDot * pointLightColor7.xyz;

   return pointLightTotal;
}

so wait

would it just be possible to like duplicate that code 20 times and then

do you know why that hasn't been done

its 8

the sun isn't a light

it isn't an engine limitation
That's strange, a bunch of other people told me that it was 8 and the sun counted as a light or something, I don't know anymore. Why is that code in place if it limits the lights?

That's strange, a bunch of other people told me that it was 8 and the sun counted as a light or something, I don't know anymore. Why is that code in place if it limits the lights?

My best guess is for faster shaders and shadows.