1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 22:20:33 +00:00

Merge branch 'fog' into 'master'

Don't use ESM4::Lighting fog power as fog density

See merge request OpenMW/openmw!2776
This commit is contained in:
AnyOldName3 2023-02-27 21:16:30 +00:00
commit 9d2947f5ef
2 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,8 @@ namespace MWWorld
.mAmbiantColor = cell.mLighting.ambient, .mAmbiantColor = cell.mLighting.ambient,
.mDirectionalColor = cell.mLighting.directional, .mDirectionalColor = cell.mLighting.directional,
.mFogColor = cell.mLighting.fogColor, .mFogColor = cell.mLighting.fogColor,
.mFogDensity = cell.mLighting.fogPower,} // TODO: use ESM4::Lighting fog parameters
.mFogDensity = 1.f,}
,mWaterHeight(cell.mWaterHeight) ,mWaterHeight(cell.mWaterHeight)
{ {
} }

View File

@ -33,7 +33,8 @@
namespace ESM4 namespace ESM4
{ {
#pragma pack(push, 1) #pragma pack(push, 1)
// guesses only for TES4
// FO3/FNV version of the struct
struct Lighting struct Lighting
{ // | Aichan Prison values { // | Aichan Prison values
std::uint32_t ambient; // | 16 17 19 00 (RGBA) std::uint32_t ambient; // | 16 17 19 00 (RGBA)
@ -45,9 +46,10 @@ namespace ESM4
std::int32_t rotationZ; // rotation z | 00 00 00 00 = 0 std::int32_t rotationZ; // rotation z | 00 00 00 00 = 0
float fogDirFade; // Fog dir fade | 00 00 80 3F = 1.f float fogDirFade; // Fog dir fade | 00 00 80 3F = 1.f
float fogClipDist; // Fog clip dist | 00 80 3B 45 = 3000.f float fogClipDist; // Fog clip dist | 00 80 3B 45 = 3000.f
float fogPower = std::numeric_limits<float>::max(); float fogPower = 1.f; // TES4 doesn't have this
}; };
// Currently unused
struct Lighting_TES5 struct Lighting_TES5
{ {
std::uint32_t ambient; std::uint32_t ambient;