Merge branch 'master' of https://github.com/supertuxkart/stk-code
This commit is contained in:
commit
30929ef0a7
@ -46,6 +46,9 @@ void main()
|
||||
vec3 light_col = col.xyz;
|
||||
float d = distance(light_pos, xpos.xyz);
|
||||
float att = energy * 200. / (1. + 33. * d + 33. * d * d);
|
||||
float max_d = 20. * energy;
|
||||
att *= (max_d - d) / max_d;
|
||||
if (att <= 0.) discard;
|
||||
|
||||
// Light Direction
|
||||
vec3 L = -normalize(xpos.xyz - light_pos);
|
||||
|
@ -29,7 +29,7 @@ const float zNear = 1.;
|
||||
void main(void)
|
||||
{
|
||||
// Beyond that value, light is too attenuated
|
||||
float r = 100 * Energy;
|
||||
float r = 30 * Energy;
|
||||
center = Position;
|
||||
energy = Energy;
|
||||
vec4 Center = ViewMatrix * vec4(Position, 1.);
|
||||
|
@ -15,6 +15,7 @@ uniform mat4 ViewMatrix;
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform mat4 InverseViewMatrix;
|
||||
uniform mat4 InverseProjectionMatrix;
|
||||
uniform mat4 ShadowViewProjMatrixes[4];
|
||||
#else
|
||||
layout (std140) uniform MatrixesData
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ uniform mat4 ViewMatrix;
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform mat4 InverseViewMatrix;
|
||||
uniform mat4 InverseProjectionMatrix;
|
||||
uniform mat4 ShadowViewProjMatrixes[4];
|
||||
#else
|
||||
layout (std140) uniform MatrixesData
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user