Double to float in shaders. Fixes in asset handling of satellites.

This commit is contained in:
Emil Axelsson
2019-04-30 17:44:37 +02:00
committed by ElonOlsson
parent d26700268f
commit b18895592f
7 changed files with 10 additions and 44 deletions

View File

@@ -12,12 +12,4 @@ local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
local objectNames = {}
asset.onInitialize(function ()
objectNames = shared.addSatelliteGroupObjects(group, tle, true)
end)
--asset.onDeinitialize(function ()
-- for _, n in ipairs(objectNames) do
-- openspace.removeSceneGraphNode(n)
-- end
--end)
shared.registerSatelliteGroupObjects(asset, group, tle, true)

View File

@@ -12,12 +12,4 @@ local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
local objectNames = {}
asset.onInitialize(function ()
objectNames = shared.addSatelliteGroupObjects(group, tle, true)
end)
--asset.onDeinitialize(function ()
-- for _, n in ipairs(objectNames) do
-- openspace.removeSceneGraphNode(n)
-- end
--end)
shared.registerSatelliteGroupObjects(asset, group, tle, true)

View File

@@ -12,12 +12,4 @@ local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
local objectNames = {}
asset.onInitialize(function ()
objectNames = shared.addSatelliteGroupObjects(group, tle, true)
end)
--asset.onDeinitialize(function ()
-- for _, n in ipairs(objectNames) do
-- openspace.removeSceneGraphNode(n)
-- end
--end)
shared.registerSatelliteGroupObjects(asset, group, tle, true)

View File

@@ -12,12 +12,4 @@ local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
local objectNames = {}
asset.onInitialize(function ()
objectNames = shared.addSatelliteGroupObjects(group, tle, true)
end)
--asset.onDeinitialize(function ()
-- for _, n in ipairs(objectNames) do
-- openspace.removeSceneGraphNode(n)
-- end
--end)
shared.registerSatelliteGroupObjects(asset, group, tle, true)

View File

@@ -21,7 +21,7 @@ function downloadTLEFile(sceneAsset, url, name)
})
end
local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
local registerSatelliteGroupObjects = function(containingAsset, group, tleFolder, shouldAddDuplicates)
local filename = group.Url:match("([^/]+)$")
local filenameSansExt = filename:gsub(filename:match("(%.%w+)$"), "")
@@ -79,14 +79,11 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
end
local Debris = debris(filenameSansExt, path, group.TrailColor)
assetHelper.registerSceneGraphNodesAndExport(asset, { Debris })
-- asset.export("satImageFolder", satImageFolder)
assetHelper.registerSceneGraphNodesAndExport(containingAsset, { Debris })
end
asset.export("downloadTLEFile", downloadTLEFile)
asset.export("addSatelliteGroupObjects", addSatelliteGroupObjects)
asset.export("registerSatelliteGroupObjects", registerSatelliteGroupObjects)

View File

@@ -853,7 +853,7 @@ void RenderableSatellites::render(const RenderData& data, RendererTasks&) {
//_programObject->setUniform(_uniformCache.numberOfOrbits, _TLEData.size());
_programObject->setUniform(_uniformCache.opacity, _opacity);
_programObject->setUniform(_uniformCache.inGameTime, _inGameTime);
_programObject->setUniform(_uniformCache.inGameTime, static_cast<float>(_inGameTime));
glm::dmat4 modelTransform =

View File

@@ -24,7 +24,8 @@
#version __CONTEXT__
#include "D:\OpenSpace\shaders\PowerScaling\powerScalingMath.hglsl"
#include "PowerScaling/powerScalingMath.hglsl"
// #include "C:\Users\Jonathan\Documents\exjobb\OpenSpace\shaders\PowerScaling\powerScalingMath.hglsl"