Improved Node interface

Former-commit-id: cbc204748d8cf30771743f26270324dee6ada242
This commit is contained in:
Lynix
2013-01-12 01:38:58 +01:00
parent a00d2d4c12
commit 4a28e42d4d
8 changed files with 174 additions and 161 deletions

View File

@@ -96,12 +96,12 @@ void NzLight::Apply(unsigned int i) const
break;
case nzLightType_Point:
shader->SendVector(parameters1Location, NzVector4f(m_derivedTranslation, m_attenuation));
shader->SendVector(parameters1Location, NzVector4f(m_derivedPosition, m_attenuation));
shader->SendVector(parameters2Location, NzVector4f(1.f/m_radius, 0.f, 0.f, 0.f));
break;
case nzLightType_Spot:
shader->SendVector(parameters1Location, NzVector4f(m_derivedTranslation, m_attenuation));
shader->SendVector(parameters1Location, NzVector4f(m_derivedPosition, m_attenuation));
shader->SendVector(parameters2Location, NzVector4f(m_derivedRotation * NzVector3f::Forward(), 1.f/m_radius));
shader->SendVector(parameters3Location, NzVector2f(std::cos(NzDegreeToRadian(m_innerAngle)), std::cos(NzDegreeToRadian(m_outerAngle))));
break;