| Blockland Forums > Suggestions & Requests |
| Be able to see more lights |
| << < (2/2) |
| otto-san:
--- Quote from: Blocki on November 28, 2012, 08:04:22 PM ---Not really, open the shader file and copy the code for each more light you want --- End quote --- wat have you actually successfully done this or seen it done because that would be amazing |
| Blocki:
--- Quote from: otto-san on November 29, 2012, 07:07:57 PM ---wat have you actually successfully done this or seen it done because that would be amazing --- End quote --- I haven't figured it out yet how to do this, but I was told that's how you do it Someone showed me an image where it rendered the effects of 32 lights However, the shaders where updated massively since then, I don't know whether it's still possible Just pasting this code for each more light doesn't do any difference, as the positions aren't put in the variables or something --- Code: ---uniform vec4 pointLightPos7; uniform vec4 pointLightColor7; uniform float pointLightRadius7; 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; --- End code --- The below part is inside a function to calculate the effects of it Something else must be modified too so it actually uses those variables for more lights, and I don't know what it is |
| Navigation |
| Message Index |
| Previous page |