diff --git a/WickedEngine/wiRenderer.cpp b/WickedEngine/wiRenderer.cpp index 88a8f2216..b8eed3322 100644 --- a/WickedEngine/wiRenderer.cpp +++ b/WickedEngine/wiRenderer.cpp @@ -1919,29 +1919,11 @@ void wiRenderer::UpdateRenderData(GRAPHICSTHREAD threadID) XMMATRIX viewMatrix = cam->GetView(); UINT lightCounter = 0; - for (Decal* decal : mainCameraCulling.culledDecals) - { - if (lightCounter == MAX_LIGHTS) - { - assert(0); // too much lights! - lightCounter--; - break; - } - XMStoreFloat3(&lightArray[lightCounter].posVS, XMVector3TransformCoord(XMLoadFloat3(&decal->translation), viewMatrix)); - lightArray[lightCounter].distance = max(decal->scale.x, max(decal->scale.y, decal->scale.z)) * 2; - lightArray[lightCounter].shadowMatrix[0] = XMMatrixTranspose(XMMatrixInverse(nullptr, XMLoadFloat4x4(&decal->world))); - lightArray[lightCounter].texMulAdd = decal->atlasMulAdd; - lightArray[lightCounter].col = XMFLOAT4(decal->color.x, decal->color.y, decal->color.z, decal->GetOpacity()); - lightArray[lightCounter].energy = decal->emissive; - lightArray[lightCounter].type = 100; - - lightCounter++; - } for (Cullable* c : culledLights) { if (lightCounter == MAX_LIGHTS) { - assert(0); // too much lights! + assert(0); // too many lights! lightCounter--; break; } @@ -2005,6 +1987,25 @@ void wiRenderer::UpdateRenderData(GRAPHICSTHREAD threadID) lightCounter++; } + for (Decal* decal : mainCameraCulling.culledDecals) + { + if (lightCounter == MAX_LIGHTS) + { + assert(0); // too many lights! + lightCounter--; + break; + } + XMStoreFloat3(&lightArray[lightCounter].posVS, XMVector3TransformCoord(XMLoadFloat3(&decal->translation), viewMatrix)); + lightArray[lightCounter].distance = max(decal->scale.x, max(decal->scale.y, decal->scale.z)) * 2; + lightArray[lightCounter].shadowMatrix[0] = XMMatrixTranspose(XMMatrixInverse(nullptr, XMLoadFloat4x4(&decal->world))); + lightArray[lightCounter].texMulAdd = decal->atlasMulAdd; + lightArray[lightCounter].col = XMFLOAT4(decal->color.x, decal->color.y, decal->color.z, decal->GetOpacity()); + lightArray[lightCounter].energy = decal->emissive; + lightArray[lightCounter].type = 100; + + lightCounter++; + } + GetDevice()->UpdateBuffer(resourceBuffers[RBTYPE_LIGHTARRAY], lightArray, threadID, (int)(sizeof(LightArrayType)*lightCounter)); } diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index bd37764cf..1c8513746 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wiVersion // minor features, major updates const int minor = 13; // minor bug fixes, alterations, refactors, updates - const int revision = 22; + const int revision = 23; long GetVersion() diff --git a/models/Sample/temp/clipboard b/models/Sample/temp/clipboard deleted file mode 100644 index eb68b3ab8..000000000 Binary files a/models/Sample/temp/clipboard and /dev/null differ diff --git a/models/Sample/temp/history0 b/models/Sample/temp/history0 deleted file mode 100644 index 38dd415f2..000000000 Binary files a/models/Sample/temp/history0 and /dev/null differ diff --git a/models/Sample/temp/history1 b/models/Sample/temp/history1 deleted file mode 100644 index 4be89ad0f..000000000 Binary files a/models/Sample/temp/history1 and /dev/null differ diff --git a/models/Sponza/temp/history0 b/models/Sponza/temp/history0 deleted file mode 100644 index b66bf2513..000000000 Binary files a/models/Sponza/temp/history0 and /dev/null differ diff --git a/models/Sponza/temp/history1 b/models/Sponza/temp/history1 deleted file mode 100644 index 89fb01b11..000000000 Binary files a/models/Sponza/temp/history1 and /dev/null differ diff --git a/models/Sponza/temp/history2 b/models/Sponza/temp/history2 deleted file mode 100644 index ef03cc421..000000000 Binary files a/models/Sponza/temp/history2 and /dev/null differ diff --git a/models/Sponza/temp/history3 b/models/Sponza/temp/history3 deleted file mode 100644 index 26b3ef723..000000000 Binary files a/models/Sponza/temp/history3 and /dev/null differ diff --git a/models/Sponza/temp/history4 b/models/Sponza/temp/history4 deleted file mode 100644 index 155b6ecb7..000000000 Binary files a/models/Sponza/temp/history4 and /dev/null differ diff --git a/models/Sponza/temp/history5 b/models/Sponza/temp/history5 deleted file mode 100644 index 31d72735c..000000000 Binary files a/models/Sponza/temp/history5 and /dev/null differ diff --git a/models/Stormtrooper/temp/clipboard b/models/Stormtrooper/temp/clipboard deleted file mode 100644 index 6f636eb14..000000000 Binary files a/models/Stormtrooper/temp/clipboard and /dev/null differ diff --git a/models/Stormtrooper/temp/history0 b/models/Stormtrooper/temp/history0 deleted file mode 100644 index 7bec7b439..000000000 Binary files a/models/Stormtrooper/temp/history0 and /dev/null differ diff --git a/models/Stormtrooper/temp/history1 b/models/Stormtrooper/temp/history1 deleted file mode 100644 index 392456524..000000000 Binary files a/models/Stormtrooper/temp/history1 and /dev/null differ diff --git a/models/Stormtrooper/temp/history2 b/models/Stormtrooper/temp/history2 deleted file mode 100644 index 5a00f6ba9..000000000 Binary files a/models/Stormtrooper/temp/history2 and /dev/null differ