1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-26 20:37:25 +00:00

Merge branch 'effectlighting' into 'master'

Apply white ambient lighting to free magic VFX

See merge request OpenMW/openmw!4496
This commit is contained in:
AnyOldName3 2025-01-05 01:22:28 +00:00
commit 25c19d584f
6 changed files with 7 additions and 9 deletions

View File

@ -516,7 +516,7 @@ namespace MWBase
virtual void spawnBloodEffect(const MWWorld::Ptr& ptr, const osg::Vec3f& worldPosition) = 0;
virtual void spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = false)
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = true)
= 0;
/// @see MWWorld::WeatherManager::isInStorm

View File

@ -329,10 +329,8 @@ namespace MWLua
}
else
{
context.mLuaManager->addAction(
[world, model = VFS::Path::Normalized(model), worldPos]() {
world->spawnEffect(model, "", worldPos, 1.f, true, true);
},
context.mLuaManager->addAction([world, model = VFS::Path::Normalized(model),
worldPos]() { world->spawnEffect(model, "", worldPos, 1.f); },
"openmw.vfx.spawn");
}
};

View File

@ -35,7 +35,7 @@ namespace MWRender
/// Add an effect. When it's finished playing, it will be removed automatically.
void addEffect(VFS::Path::NormalizedView model, std::string_view textureOverride,
const osg::Vec3f& worldPosition, float scale, bool isMagicVFX = true, bool useAmbientLight = false);
const osg::Vec3f& worldPosition, float scale, bool isMagicVFX = true, bool useAmbientLight = true);
void update(float dt);

View File

@ -195,7 +195,7 @@ namespace MWRender
SkyManager* getSkyManager();
void spawnEffect(VFS::Path::NormalizedView model, std::string_view texture, const osg::Vec3f& worldPosition,
float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = false);
float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = true);
/// Clear all savegame-specific data
void clear();

View File

@ -3685,7 +3685,7 @@ namespace MWWorld
const VFS::Path::Normalized model = Misc::ResourceHelpers::correctMeshPath(
VFS::Path::Normalized(Fallback::Map::getString("Blood_Model_" + std::to_string(number))));
mRendering->spawnEffect(model, texture, worldPosition, 1.0f, false);
mRendering->spawnEffect(model, texture, worldPosition, 1.0f, false, false);
}
void World::spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,

View File

@ -604,7 +604,7 @@ namespace MWWorld
void spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true,
bool useAmbientLight = false) override;
bool useAmbientLight = true) override;
/// @see MWWorld::WeatherManager::isInStorm
bool isInStorm() const override;