diff --git a/WickedEngine/MainComponent.cpp b/WickedEngine/MainComponent.cpp index 6e27772d4..b5d7ba0f8 100644 --- a/WickedEngine/MainComponent.cpp +++ b/WickedEngine/MainComponent.cpp @@ -187,7 +187,7 @@ void MainComponent::Compose() } ss << endl; } - wiFont(ss.str(), wiFontProps(0, 0, infoDisplay.size, WIFALIGN_LEFT, WIFALIGN_TOP)).Draw(); + wiFont(ss.str(), wiFontProps(4, 4, infoDisplay.size, WIFALIGN_LEFT, WIFALIGN_TOP)).Draw(); } // Draw the color grading palette diff --git a/WickedEngine/pointLightVS.hlsl b/WickedEngine/pointLightVS.hlsl index 10dcb0e65..14c505cbf 100644 --- a/WickedEngine/pointLightVS.hlsl +++ b/WickedEngine/pointLightVS.hlsl @@ -6,7 +6,7 @@ VertexToPixel main(uint vid : SV_VERTEXID) VertexToPixel Out = (VertexToPixel)0; float4 pos = ICOSPHERE[vid]; - Out.pos = Out.pos2D = mul(mul(pos,g_xTransform),g_xCamera_VP); + Out.pos = Out.pos2D = mul(pos, g_xTransform); Out.lightIndex = (int)g_xColor.x; return Out; } \ No newline at end of file diff --git a/WickedEngine/spotLightVS.hlsl b/WickedEngine/spotLightVS.hlsl index a4833a0a1..175273a85 100644 --- a/WickedEngine/spotLightVS.hlsl +++ b/WickedEngine/spotLightVS.hlsl @@ -7,8 +7,7 @@ VertexToPixel main(uint vid : SV_VERTEXID) VertexToPixel Out = (VertexToPixel)0; float4 pos = CONE[vid]; - pos = mul( pos, g_xTransform ); - Out.pos = Out.pos2D = mul(pos,g_xCamera_VP); + Out.pos = Out.pos2D = mul( pos, g_xTransform ); Out.lightIndex = (int)g_xColor.x; return Out; } \ No newline at end of file diff --git a/WickedEngine/vDiscLightVS.hlsl b/WickedEngine/vDiscLightVS.hlsl index b07251763..6b172e990 100644 --- a/WickedEngine/vDiscLightVS.hlsl +++ b/WickedEngine/vDiscLightVS.hlsl @@ -6,8 +6,7 @@ VertexToPixel main(uint vID : SV_VertexID) VertexToPixel Out = (VertexToPixel)0; float4 pos = CIRCLE[vID]; - pos = mul(pos, lightWorld); - Out.pos = mul(pos, g_xCamera_VP); + Out.pos = mul(pos, lightWorld); Out.col = float4(lightColor.rgb * lightEnerdis.x, 1); return Out; diff --git a/WickedEngine/vRectangleLightVS.hlsl b/WickedEngine/vRectangleLightVS.hlsl index 16275d217..4d92d06a8 100644 --- a/WickedEngine/vRectangleLightVS.hlsl +++ b/WickedEngine/vRectangleLightVS.hlsl @@ -6,8 +6,7 @@ VertexToPixel main(uint vID : SV_VertexID) VertexToPixel Out = (VertexToPixel)0; float4 pos = QUAD[vID]; - pos = mul(pos, lightWorld); - Out.pos = mul(pos, g_xCamera_VP); + Out.pos = mul(pos, lightWorld); Out.col = float4(lightColor.rgb * lightEnerdis.x, 1); return Out; diff --git a/WickedEngine/vSphereLightVS.hlsl b/WickedEngine/vSphereLightVS.hlsl index 04bae2e1c..7c3e71592 100644 --- a/WickedEngine/vSphereLightVS.hlsl +++ b/WickedEngine/vSphereLightVS.hlsl @@ -6,8 +6,7 @@ VertexToPixel main(uint vID : SV_VertexID) VertexToPixel Out = (VertexToPixel)0; float4 pos = UVSPHERE[vID]; - pos = mul(pos, lightWorld); - Out.pos = mul(pos, g_xCamera_VP); + Out.pos = mul(pos, lightWorld); Out.col = float4(lightColor.rgb * lightEnerdis.x, 1); return Out; diff --git a/WickedEngine/vTubeLightVS.hlsl b/WickedEngine/vTubeLightVS.hlsl index c1983613f..e9ac0aaee 100644 --- a/WickedEngine/vTubeLightVS.hlsl +++ b/WickedEngine/vTubeLightVS.hlsl @@ -6,8 +6,7 @@ VertexToPixel main(uint vID : SV_VertexID) VertexToPixel Out = (VertexToPixel)0; float4 pos = CYLINDER[vID]; - pos = mul(pos, lightWorld); - Out.pos = mul(pos, g_xCamera_VP); + Out.pos = mul(pos, lightWorld); Out.col = float4(lightColor.rgb * lightEnerdis.x, 1); return Out; diff --git a/WickedEngine/wiRenderer.cpp b/WickedEngine/wiRenderer.cpp index 45fc44906..b6e91ba76 100644 --- a/WickedEngine/wiRenderer.cpp +++ b/WickedEngine/wiRenderer.cpp @@ -2530,7 +2530,7 @@ void wiRenderer::DrawLights(Camera* camera, GRAPHICSTHREAD threadID) MiscCB miscCb; miscCb.mColor.x = (float)l->lightArray_index; float sca = l->enerDis.y + 1; - miscCb.mTransform = XMMatrixTranspose(XMMatrixScaling(sca, sca, sca)*XMMatrixTranslation(l->translation.x, l->translation.y, l->translation.z)); + miscCb.mTransform = XMMatrixTranspose(XMMatrixScaling(sca, sca, sca)*XMMatrixTranslation(l->translation.x, l->translation.y, l->translation.z) * camera->GetViewProjection()); GetDevice()->UpdateBuffer(constantBuffers[CBTYPE_MISC], &miscCb, threadID); GetDevice()->Draw(240, threadID); // icosphere @@ -2544,7 +2544,8 @@ void wiRenderer::DrawLights(Camera* camera, GRAPHICSTHREAD threadID) miscCb.mTransform = XMMatrixTranspose( XMMatrixScaling(coneS*l->enerDis.y, l->enerDis.y, coneS*l->enerDis.y)* XMMatrixRotationQuaternion(XMLoadFloat4(&l->rotation))* - XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation)) + XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation)) * + camera->GetViewProjection() ); GetDevice()->UpdateBuffer(constantBuffers[CBTYPE_MISC], &miscCb, threadID); @@ -2657,7 +2658,8 @@ void wiRenderer::DrawVolumeLights(Camera* camera, GRAPHICSTHREAD threadID) lcb.world = XMMatrixTranspose( XMMatrixScaling(l->radius, l->radius, l->radius)* XMMatrixRotationQuaternion(XMLoadFloat4(&l->rotation))* - XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation)) + XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation))* + camera->GetViewProjection() ); GetDevice()->UpdateBuffer(constantBuffers[CBTYPE_VOLUMELIGHT], &lcb, threadID); @@ -2669,7 +2671,8 @@ void wiRenderer::DrawVolumeLights(Camera* camera, GRAPHICSTHREAD threadID) lcb.world = XMMatrixTranspose( XMMatrixScaling(l->radius, l->radius, l->radius)* XMMatrixRotationQuaternion(XMLoadFloat4(&l->rotation))* - XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation)) + XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation))* + camera->GetViewProjection() ); GetDevice()->UpdateBuffer(constantBuffers[CBTYPE_VOLUMELIGHT], &lcb, threadID); @@ -2681,7 +2684,8 @@ void wiRenderer::DrawVolumeLights(Camera* camera, GRAPHICSTHREAD threadID) lcb.world = XMMatrixTranspose( XMMatrixScaling(l->width * 0.5f, l->height * 0.5f, 0.5f)* XMMatrixRotationQuaternion(XMLoadFloat4(&l->rotation))* - XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation)) + XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation))* + camera->GetViewProjection() ); GetDevice()->UpdateBuffer(constantBuffers[CBTYPE_VOLUMELIGHT], &lcb, threadID); @@ -2693,7 +2697,8 @@ void wiRenderer::DrawVolumeLights(Camera* camera, GRAPHICSTHREAD threadID) lcb.world = XMMatrixTranspose( XMMatrixScaling(max(l->width * 0.5f, l->radius), l->radius, l->radius)* XMMatrixRotationQuaternion(XMLoadFloat4(&l->rotation))* - XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation)) + XMMatrixTranslationFromVector(XMLoadFloat3(&l->translation))* + camera->GetViewProjection() ); GetDevice()->UpdateBuffer(constantBuffers[CBTYPE_VOLUMELIGHT], &lcb, threadID); diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index e8cdf31e7..beef222c0 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -7,7 +7,7 @@ namespace wiVersion // minor features, major updates const int minor = 9; // minor bug fixes, alterations, refactors, updates - const int revision = 55; + const int revision = 56; long GetVersion()