mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
lighting fix
This commit is contained in:
parent
b2109a1302
commit
332671b43d
@ -396,7 +396,7 @@ void NIFLoader::createMaterial(const String &name,
|
|||||||
for (int i=0; i<num_lights; ++i)
|
for (int i=0; i<num_lights; ++i)
|
||||||
{
|
{
|
||||||
outStream <<
|
outStream <<
|
||||||
" float3 lightDir"<<i<<" = lightPositionObjSpace"<<i<<".xyz - positionObjSpace.xyz; \n"
|
" float3 lightDir"<<i<<" = lightPositionObjSpace"<<i<<".xyz - (positionObjSpace.xyz * lightPositionObjSpace"<<i<<".w); \n"
|
||||||
|
|
||||||
// pre-multiply light color with attenuation factor
|
// pre-multiply light color with attenuation factor
|
||||||
" d = length( lightDir"<<i<<" ); \n"
|
" d = length( lightDir"<<i<<" ); \n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user