Big commit, sorry

- add animated mesh detection for Selection
- add local lightning setting
- add settings for rendering m2/wmo extra boxes
- drawing animation bounding boxes for small animated objects
- add distance check for WMo doodads
- performance improvements
- render red boxes for particle models without a mesh to allow selecting them
- limit rate of alphamap upload per frame to avoid freezes (long rame times where too much is processed in one frame)
- lightning improvements and rework
- now loading zone lights and rendering them
- new tree filter for area and light editors
- Light editor UI revamp, new lightning info window and active lights display/selection
- tools can now be expended horizontally
- fixed zone browser tree UI, now is more compact
- updated boxes colors
This commit is contained in:
T1ti
2024-10-19 23:08:46 +02:00
parent 7e6f9bb6a3
commit a4c34381da
59 changed files with 3531 additions and 1648 deletions

View File

@@ -1301,6 +1301,7 @@ void TextureSet::uploadAlphamapData()
return;
static std::array<float, 3 * 64 * 64> amap{};
std::fill(amap.begin(), amap.end(), 0.0f);
if (tmp_edit_values)
{
@@ -1310,13 +1311,15 @@ void TextureSet::uploadAlphamapData()
{
for (int alpha_id = 0; alpha_id < 3; ++alpha_id)
{
amap[i * 3 + alpha_id] = (alpha_id < nTextures - 1) ? tmp_amaps[alpha_id + 1][i] / 255.f : 0.f;
// amap[i * 3 + alpha_id] = (alpha_id < nTextures - 1) ? tmp_amaps[alpha_id + 1][i] / 255.f : 0.f;
if (alpha_id < nTextures - 1)
amap[i * 3 + alpha_id] = tmp_amaps[alpha_id + 1][i] / 255.f;
}
}
}
else
{
uint8_t const* alpha_ptr[3];
uint8_t const* alpha_ptr[3]{ nullptr, nullptr, nullptr };
for (int i = 0; i < nTextures - 1; ++i)
{
@@ -1329,12 +1332,12 @@ void TextureSet::uploadAlphamapData()
{
if (alpha_id < nTextures - 1)
{
amap[i * 3 + alpha_id] = *(alpha_ptr[alpha_id]++) / 255.0f;
}
else
{
amap[i * 3 + alpha_id] = 0.f;
amap[i * 3 + alpha_id] = static_cast<float>(*(alpha_ptr[alpha_id]++)) / 255.0f;
}
// else
// {
// amap[i * 3 + alpha_id] = 0.f;
// }
}
}