diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-06-21 14:33:12 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-06-21 14:33:12 +0400 |
commit | b4742833678ee240e92dae17f00d74d097c8fbe8 (patch) | |
tree | e676ff95e4d36e2b6c4347ffd136e6b18e7ae77b /source/gameengine/Converter | |
parent | c302bfcb7c50a6b09d97aa55900652f8b8d2fd60 (diff) |
Apricot Branch: GLSL
====================
* Added initial support for shadow buffers, works in the 3d view and the
game engine, but has known issues still:
* Shadow buffers are made again for each 3d viewport unnecessarily.
* No filtering.
* There was a bug with some shaders going black, but can't reproduce
it anymore?
* Added support for layer lamps, though they're still always computed
in the shader, this needs to be optimized.
* Added support for animating lamp position/rotation in the game engine.
* Fix issue with lamps giving negative light on the backside.
* Fix issue with specular + orthographic camera.
* Fix square spotlights.
* Potential workaround for a bug in the nvidia drivers with shader linking.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index b2c25198ab4..542c6b5d9e3 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1552,7 +1552,7 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, -static KX_LightObject *gamelight_from_blamp(Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) { +static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) { RAS_LightObject lightobj; KX_LightObject *gamelight; @@ -1584,8 +1584,11 @@ static KX_LightObject *gamelight_from_blamp(Lamp *la, unsigned int layerflag, KX } else { lightobj.m_type = RAS_LightObject::LIGHT_NORMAL; } + + if(converter->GetGLSLMaterials()) + GPU_lamp_from_blender(ob, la); - gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj); + gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj, ob->gpulamp); BL_ConvertLampIpos(la, gamelight, converter); return gamelight; @@ -1617,7 +1620,7 @@ static KX_GameObject *gameobject_from_blenderobject( { case OB_LAMP: { - KX_LightObject* gamelight= gamelight_from_blamp(static_cast<Lamp*>(ob->data), ob->lay, kxscene, rendertools, converter); + KX_LightObject* gamelight= gamelight_from_blamp(ob, static_cast<Lamp*>(ob->data), ob->lay, kxscene, rendertools, converter); gameobj = gamelight; gamelight->AddRef(); |