Skip to content

Commit

Permalink
Lighting RE
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Aug 20, 2024
1 parent 27f6b0f commit 7bfd5bc
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 125 deletions.
11 changes: 6 additions & 5 deletions include/RE/B/BSLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace RE
{
class BSCullingProcess;
class BSPortalGraph;
class BSTriShape;
class NiAVObject;
Expand Down Expand Up @@ -39,11 +40,11 @@ namespace RE
~BSLight() override; // 00

// add
virtual bool Unk_02(NiLight* a_light); // 02
virtual bool Unk_03(); // 03
virtual bool SetLight(NiLight* a_light); // 02
virtual bool IsShadowLight(); // 03

// members
std::uint32_t unk010; // 010
float luminance; // 010
float lodDimmer; // 014
Data unk018; // 018
std::uint64_t unk038; // 038
Expand All @@ -54,7 +55,7 @@ namespace RE
bool portalStrict; // 047
NiPointer<NiLight> light; // 048
NiPoint3 worldTranslate; // 050
std::uint32_t unk05C; // 05C
std::uint32_t frustrumCull; // 05C
std::uint8_t unk060; // 060
bool affectLand; // 061
bool affectWater; // 062
Expand All @@ -70,7 +71,7 @@ namespace RE
BSTArray<void*> unk0F0; // 0F0
BSTArray<void*> unk108; // 108
BSPortalGraph* portalGraph; // 120
std::uint64_t unk128; // 128
BSCullingProcess* cullingProcess; // 128
NiPointer<NiAVObject> objectNode; // 130
BSLensFlareRenderData* lensFlareData; // 138
};
Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BSShadowLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ namespace RE
std::uint32_t unk144; // 144
BSTArray<void*> unk148; // 148
Data unk160[4]; // 161
std::uint32_t unk520; // 520
std::uint32_t maskIndex; // 520
std::uint32_t unk524; // 524
BSTArray<void*> unk528; // 528
float shadowBiasScale; // 540
std::uint32_t unk544; // 544
std::uint32_t sceneGraphIndex; // 544
std::uint32_t unk548; // 548
std::uint32_t unk54C; // 54C
std::uint32_t unk550; // 550
Expand Down
8 changes: 4 additions & 4 deletions include/RE/H/HighProcessData.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ namespace RE
{
public:
// members
bool unk00; // 00
bool unk01; // 01
bool unk02; // 02
bool enabled; // 00
bool mpsEnabled; // 01
bool updateLight; // 02
bool unk03; // 03
float unk04; // 04
float enableTimer; // 04
float muzzleFlashDuration; // 08
std::uint32_t unk0C; // 0C
NiPointer<NiAVObject> projectile3D; // 10
Expand Down
4 changes: 2 additions & 2 deletions include/RE/N/NiCloningProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace RE
BSTHashMap<NiObject*, bool> processMap; // 30
std::uint32_t copyType; // 60
char appendChar; // 64
std::uint16_t unk65; // 65
NiPoint3 unk68; // 68
std::uint16_t pad65; // 65
NiPoint3 scale; // 68
};
static_assert(sizeof(NiCloningProcess) == 0x78);
}
123 changes: 62 additions & 61 deletions include/RE/S/ShadowSceneNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ namespace RE
{
public:
// members
bool dynamic; // 00
bool shadowLight; // 01
bool portalStrict; // 02
bool affectLand; // 03
bool affectWater; // 04
bool neverFades; // 05
float fov; // 08
float falloff; // 0C
float nearDistance; // 10
float depthBias; // 14
std::uint32_t unk18; // 18
NiAVObject* restrictedNode; // 20
BSLensFlareRenderData* lensFlareData; // 28
bool dynamic; // 00
bool shadowLight; // 01
bool portalStrict; // 02
bool affectLand; // 03
bool affectWater; // 04
bool neverFades; // 05
float fov; // 08
float falloff; // 0C
float nearDistance; // 10
float depthBias; // 14
std::uint32_t sceneGraphIndex; // 18
NiAVObject* restrictedNode; // 20
BSLensFlareRenderData* lensFlareData; // 28
};

~ShadowSceneNode() override; // 00
Expand All @@ -53,54 +53,55 @@ namespace RE
}

// members
std::uint64_t unk128; // 128
BSTArray<NiPointer<BSLight>> activeLights; // 130
BSTArray<NiPointer<BSLight>> unk148; // 148
BSTArray<NiPointer<BSLight>> unk160; // 160
BSTArray<void*> unk178; // 178
BSTArray<NiPointer<BSLight>> unk190; // 190
mutable BSSpinLock unk1A8; // 1A8
BSTArray<NiPointer<NiAVObject>> geometries; // 1B0
BSTArray<NiPointer<NiAVObject>> particleNodes; // 1C8
BSTArray<NiPointer<NiAVObject>> actorRootNodes; // 1E0
mutable BSSpinLock unk1F8; // 1F8
BSLight* sunLight; // 200
BSLight* cloudLight; // 208
BSShadowDirectionalLight* shadowDirLight; // 210
std::uint8_t unk218; // 218
std::uint8_t unk219; // 219
std::uint8_t unk21A; // 21A
std::uint8_t unk21B; // 21B
std::uint32_t pad21C; // 21C
NiPointer<BSFogProperty> fogProperty; // 220
BSPortalGraph* portalGraph; // 228
BSTArray<BSShadowLight*> shadowCasterLights; // 230
std::uint64_t unk248; // 248
std::uint64_t unk250; // 250
std::uint64_t unk258; // 258
std::uint64_t unk260; // 260
std::uint64_t unk268; // 268
std::uint64_t unk270; // 270
std::uint64_t unk278; // 278
std::uint64_t unk280; // 280
std::uint64_t unk288; // 288
std::uint64_t unk290; // 290
std::uint64_t unk298; // 298
std::uint64_t unk2A0; // 2A0
std::uint64_t unk2A8; // 2A8
std::uint64_t unk2B0; // 2B0
std::uint64_t unk2B8; // 2B8
std::uint64_t unk2C0; // 2C0
std::uint64_t unk2C8; // 2C8
std::uint64_t unk2D0; // 2D0
std::uint64_t unk2D8; // 2D8
std::uint64_t unk2E0; // 2E0
NiPoint3 unk2E8; // 2E8
NiPoint3 cameraPos; // 2F4
std::uint8_t unk300; // 300
std::uint8_t pad301; // 301
std::uint16_t pad302; // 302
float unk304; // 304
std::uint64_t unk128; // 128
BSTArray<NiPointer<BSLight>> activeLights; // 130
BSTArray<NiPointer<BSLight>> activeShadowLights; // 148
BSTArray<NiPointer<BSLight>> lightQueueAdd; // 160
BSTArray<NiPointer<BSLight>> lightQueueRemove; // 178
BSTArray<NiPointer<BSLight>> unk190; // 190 - unused?
mutable BSSpinLock lightQueueLock; // 1A8
BSTArray<NiPointer<NiAVObject>> litGeometry; // 1B0
BSTArray<NiPointer<NiAVObject>> objectList1; // 1C8
BSTArray<NiPointer<NiAVObject>> objectList2; // 1E0
mutable BSSpinLock objectListLock; // 1F8
BSLight* sunLight; // 200
BSLight* cloudLight; // 208
BSShadowDirectionalLight* shadowDirLight; // 210
std::uint8_t sceneGraphIndex; // 218
bool disableLightUpdate; // 219
bool wireframe; // 21A
bool opaqueWireframe; // 21B
std::uint32_t pad21C; // 21C
NiPointer<BSFogProperty> fogProperty; // 220
BSPortalGraph* portalGraph; // 228
BSTArray<BSShadowLight*> shadowLightsAccum; // 230
std::uint32_t firstPersonShadowMask; // 248
std::uint32_t unk24C; // 24C
std::uint64_t unk250; // 250
std::uint64_t unk258; // 258
std::uint64_t unk260; // 260
std::uint64_t unk268; // 268
std::uint64_t unk270; // 270
std::uint64_t unk278; // 278
std::uint64_t unk280; // 280
std::uint64_t unk288; // 288
std::uint64_t unk290; // 290
std::uint64_t unk298; // 298
std::uint64_t unk2A0; // 2A0
std::uint64_t unk2A8; // 2A8
std::uint64_t unk2B0; // 2B0
std::uint64_t unk2B8; // 2B8
std::uint64_t unk2C0; // 2C0
std::uint64_t unk2C8; // 2C8
std::uint64_t unk2D0; // 2D0
std::uint64_t unk2D8; // 2D8
std::uint64_t unk2E0; // 2E0
NiPoint3 lightingOffset; // 2E8
NiPoint3 cameraPos; // 2F4
bool allowLightRemoveQueues; // 300
std::uint8_t pad301; // 301
std::uint16_t pad302; // 302
float windMagnitude; // 304
};
static_assert(sizeof(ShadowSceneNode) == 0x308);
}
3 changes: 2 additions & 1 deletion include/RE/S/Sky.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ namespace RE
BSSimpleList<SkySound*>* skySoundList; // 1C0
float flash; // 1C8
std::uint32_t pad1CC; // 1CC
std::time_t flashTime; // 1D0
std::uint32_t flashTime; // 1D0
float windowReflectionTimer; // 1D4
std::uint32_t lastMoonPhaseUpdate; // 1D8
stl::enumeration<Flags, std::uint32_t> flags; // 1DC
ImageSpaceModifierInstanceForm* currentWeatherImageSpaceMod; // 1E0
Expand Down
100 changes: 50 additions & 50 deletions include/RE/T/TESWaterSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,56 +40,56 @@ namespace RE
}

// members
std::uint32_t pad000; // 000
BSFixedString* type; // 008
std::uint32_t unk010; // 010
std::uint32_t pad014; // 014
float unk018; // 018
float unk01C; // 01C
BSTArray<NiPointer<TESWaterObject>> waterObjects; // 020
BSTArray<NiPointer<TESWaterReflections>> waterReflections; // 038
BSTArray<NiPointer<TESWaterDisplacement>> waterDisplacement; // 050
BSTArray<NiPointer<TESWaterNormals>> waterNormals; // 068
std::uint32_t unk080; // 080
NiPoint2 unk084; // 084
std::uint32_t pad08C; // 08C
NiPointer<NiNode> waterRoot; // 090
TESWaterForm* currentWaterType; // 098
std::uint32_t reflectionExteriorCount; // 0A0
std::uint32_t reflectionInteriorCount; // 0A4
TESWorldSpace* worldSpace; // 0A8
bool enabled; // 0B0
std::uint8_t pad0B1; // 0B1
std::uint16_t pad0B2; // 0B2
std::uint32_t unk0B4; // 0B4
bool playerUnderwater; // 0B8
bool unk0B9; // 0B9
bool unk0BA; // 0BA
std::uint8_t pad0BB; // 0BB
std::uint32_t unk0BC; // 0BC
float underwaterHeight; // 0C0
bool waterRadiusState; // 0C4
std::uint8_t pad0C5; // 0C5
std::uint8_t unk0C6; // 0C6
bool showProcedualWater; // 0C7
std::uint8_t unk0C8; // 0C8
std::uint8_t padC9; // 0C9
std::uint16_t padCA; // 0CA
std::uint32_t unk0CC; // 0CC
std::uint32_t unk0D0; // 0D0
float unk0D4; // 0D4
NiTPointerMap<ActorHandle, WadingWaterData*> wadingWaterData; // 0D8
std::uint64_t unk0F8; // 0F8
std::uint64_t unk100; // 108
std::uint32_t unk108; // 108
std::uint32_t pad10C; // 10C
std::uint8_t unk110; // 110
std::uint8_t pad111; // 111
std::uint16_t pad112; // 112
std::uint32_t pad114; // 114
TESObjectCELL* unk118; // 118
mutable BSSpinLock lock; // 120
NiPointer<BSTriShape> autoWater; // 128
std::uint32_t pad000; // 000
BSFixedString* type; // 008
std::uint32_t unk010; // 010
std::uint32_t pad014; // 014
float unk018; // 018
float unk01C; // 01C
BSTArray<NiPointer<TESWaterObject>> waterObjects; // 020
BSTArray<NiPointer<TESWaterReflections>> waterReflections; // 038
BSTArray<NiPointer<TESWaterDisplacement>> waterDisplacement; // 050
BSTArray<NiPointer<TESWaterNormals>> waterNormals; // 068
std::uint32_t unk080; // 080
NiPoint2 unk084; // 084
std::uint32_t pad08C; // 08C
NiPointer<NiNode> waterRoot; // 090
TESWaterForm* currentWaterType; // 098
std::uint32_t reflectionExteriorCount; // 0A0
std::uint32_t reflectionInteriorCount; // 0A4
TESWorldSpace* worldSpace; // 0A8
bool enabled; // 0B0
std::uint8_t pad0B1; // 0B1
std::uint16_t pad0B2; // 0B2
std::uint32_t unk0B4; // 0B4
bool playerUnderwater; // 0B8
bool unk0B9; // 0B9
bool unk0BA; // 0BA
std::uint8_t pad0BB; // 0BB
std::uint32_t unk0BC; // 0BC
float underwaterHeight; // 0C0
bool waterRadiusState; // 0C4
std::uint8_t pad0C5; // 0C5
std::uint8_t unk0C6; // 0C6
bool showProcedualWater; // 0C7
std::uint8_t unk0C8; // 0C8
std::uint8_t padC9; // 0C9
std::uint16_t padCA; // 0CA
std::uint32_t unk0CC; // 0CC
std::uint32_t unk0D0; // 0D0
float timeSinceLastRipplePlaced; // 0D4
NiTPointerMap<ActorHandle, WadingWaterData*> wadingWaterData; // 0D8
std::uint64_t unk0F8; // 0F8
std::uint64_t unk100; // 108
std::uint32_t unk108; // 108
std::uint32_t pad10C; // 10C
std::uint8_t unk110; // 110
std::uint8_t pad111; // 111
std::uint16_t pad112; // 112
std::uint32_t pad114; // 114
TESObjectCELL* unk118; // 118
mutable BSSpinLock lock; // 120
NiPointer<BSTriShape> autoWater; // 128
};
static_assert(sizeof(TESWaterSystem) == 0x130);
};

0 comments on commit 7bfd5bc

Please sign in to comment.