1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

lighting fix

This commit is contained in:
scrawl 2012-03-04 22:26:40 +01:00
parent b2109a1302
commit 332671b43d

View File

@ -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"