Fixed forward shading point lights for real
Thanks to Raakz Former-commit-id: a6c2b282a18d2dfa94732afb401811c8dd5d4b93
This commit is contained in:
parent
4016d2fdcf
commit
9533f16e46
File diff suppressed because one or more lines are too long
|
|
@ -169,7 +169,7 @@ void main()
|
|||
float lightDirLength = length(lightDir);
|
||||
lightDir /= lightDirLength; // Normalisation
|
||||
|
||||
float att = max(Lights[i].parameters1.w - Lights[i].parameters2.x*lightDirLength, 0.0);
|
||||
float att = max(Lights[i].parameters1.w - Lights[i].parameters2.w*lightDirLength, 0.0);
|
||||
|
||||
// Ambient
|
||||
lightAmbient += att * Lights[i].color.rgb * Lights[i].factors.x * (MaterialAmbient.rgb + SceneAmbient.rgb);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -175,7 +175,7 @@ void main()
|
|||
float lightDirLength = length(lightDir);
|
||||
lightDir /= lightDirLength; // Normalisation
|
||||
|
||||
float att = max(Lights[i].parameters1.w - Lights[i].parameters2.x*lightDirLength, 0.0);
|
||||
float att = max(Lights[i].parameters1.w - Lights[i].parameters2.w*lightDirLength, 0.0);
|
||||
|
||||
// Ambient
|
||||
lightAmbient += att * Lights[i].color.rgb * Lights[i].factors.x * (MaterialAmbient.rgb + SceneAmbient.rgb);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue