Commit 96702558 authored by David Gilbert's avatar David Gilbert

Minimap fun!

parent bf39c6b6
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
# Blender v2.76 (sub 0) OBJ File: ''
# www.blender.org
mtllib circle_filled.mtl
o Circle_Circle.002
v 0.000000 0.000000 0.000000
v 0.000000 0.000000 -1.000000
v -0.195090 0.000000 -0.980785
v -0.382683 0.000000 -0.923880
v -0.555570 0.000000 -0.831470
v -0.707107 0.000000 -0.707107
v -0.831470 0.000000 -0.555570
v -0.923880 0.000000 -0.382683
v -0.980785 0.000000 -0.195090
v -1.000000 0.000000 -0.000000
v -0.980785 0.000000 0.195090
v -0.923880 0.000000 0.382683
v -0.831470 0.000000 0.555570
v -0.707107 0.000000 0.707107
v -0.555570 0.000000 0.831470
v -0.382683 0.000000 0.923880
v -0.195090 0.000000 0.980785
v 0.000000 0.000000 1.000000
v 0.195091 0.000000 0.980785
v 0.382684 0.000000 0.923879
v 0.555571 0.000000 0.831469
v 0.707107 0.000000 0.707106
v 0.831470 0.000000 0.555570
v 0.923880 0.000000 0.382683
v 0.980785 0.000000 0.195089
v 1.000000 0.000000 -0.000001
v 0.980785 0.000000 -0.195091
v 0.923879 0.000000 -0.382684
v 0.831469 0.000000 -0.555571
v 0.707106 0.000000 -0.707108
v 0.555569 0.000000 -0.831470
v 0.382682 0.000000 -0.923880
v 0.195089 0.000000 -0.980786
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 1//1 2//1 3//1
f 1//1 3//1 4//1
f 1//1 4//1 5//1
f 1//1 5//1 6//1
f 1//1 6//1 7//1
f 1//1 7//1 8//1
f 1//1 8//1 9//1
f 1//1 9//1 10//1
f 1//1 10//1 11//1
f 1//1 11//1 12//1
f 1//1 12//1 13//1
f 1//1 13//1 14//1
f 1//1 14//1 15//1
f 1//1 15//1 16//1
f 1//1 16//1 17//1
f 1//1 17//1 18//1
f 1//1 18//1 19//1
f 1//1 19//1 20//1
f 1//1 20//1 21//1
f 1//1 21//1 22//1
f 1//1 22//1 23//1
f 1//1 23//1 24//1
f 1//1 24//1 25//1
f 1//1 25//1 26//1
f 1//1 26//1 27//1
f 1//1 27//1 28//1
f 1//1 28//1 29//1
f 1//1 29//1 30//1
f 1//1 30//1 31//1
f 1//1 31//1 32//1
f 1//1 32//1 33//1
f 1//1 33//1 2//1
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
# Blender v2.76 (sub 0) OBJ File: ''
# www.blender.org
mtllib cone.mtl
o Cone_Cone.002
v 0.000000 -1.000000 1.500000
v 0.707107 -0.707107 1.500000
v 1.000000 0.000000 1.500000
v 0.707107 0.707107 1.500000
v -0.000000 1.000000 1.500000
v 0.000000 -0.000000 -1.500000
v -0.707107 0.707107 1.500000
v -1.000000 0.000000 1.500000
v -0.707107 -0.707107 1.500000
vn -0.883000 -0.365700 -0.294300
vn 0.365700 -0.883000 -0.294300
vn -0.883000 0.365700 -0.294300
vn -0.365700 0.883000 -0.294300
vn 0.365700 0.883000 -0.294300
vn 0.883000 0.365700 -0.294300
vn -0.365700 -0.883000 -0.294300
vn 0.883000 -0.365700 -0.294300
vn 0.000000 0.000000 1.000000
usemtl None
s off
f 8//1 6//1 9//1
f 1//2 6//2 2//2
f 7//3 6//3 8//3
f 5//4 6//4 7//4
f 4//5 6//5 5//5
f 3//6 6//6 4//6
f 9//7 6//7 1//7
f 2//8 6//8 3//8
f 1//9 2//9 3//9 4//9 5//9 7//9 8//9 9//9
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
This diff is collapsed.
#define LAST_SHADER TESSELATION
#pragma import "../CommonDeferredFrag.glsl"
#pragma import "../Utils.glsl"
vec4 color() {
return uTintColor;
}
vec4 emissive() {
return uEmissiveColor;
}
vec3 normal() {
return vNormal;
}
vec4 specularSmoothness() {
return vec4(0, 0, 0, 0);
}
\ No newline at end of file
#define LAST_SHADER VERTEX
#pragma import "../CommonDeferredVert.glsl"
vec3 normal() {
return aNormal;
}
vec2 texCoord() {
return vec2(0, 0);
}
vec3 position() {
vec4 modelPos = vec4(aPosition, 1.0) ;
vec4 worldPosition = uViewProjectionMatrix * uModelMatrix * modelPos;
gl_Position = worldPosition;
return worldPosition.xyz;
}
#define LAST_SHADER TESSELATION
#define LAST_SHADER VERTEX
#pragma import "CommonDeferredFrag.glsl"
......@@ -11,9 +11,9 @@ vec4 emissive() {
}
vec3 normal() {
return teNormal;
return vNormal;
}
vec4 specularSmoothness() {
return vec4(0, 0, 0, 0);
return vec4(1, 1, 1, 1);
}
#pragma import "CommonDeferredVert.glsl"
vec3 normal() {
return vec3(0, 1, 0);
return aNormal;
}
vec2 texCoord() {
return vec2(0, 0);
return aTexCoord;
}
vec3 position() {
vec4 modelPos = vec4(aPosition, 1.0);
vec4 worldPosition = uViewProjectionMatrix * uModelMatrix * modelPos;
vec4 worldPosition = uViewProjectionMatrix * uModelMatrix * modelPos;
gl_Position = worldPosition;
return worldPosition.xyz;
}
\ No newline at end of file
......@@ -19,6 +19,7 @@ private:
Geometry defaultGeom;
Geometry orbitTorus;
Geometry minimapItem;
Material planetMat;
Material earthMat;
......@@ -27,8 +28,10 @@ private:
Material atmosphereMat;
Material ttfMaterial;
Material waterMat;
Material minimapItemMaterial;
std::vector<Entity> trajectories;
std::vector<Entity> trajectories;
glm::dvec3 applyKepler(Planet::Handle planet, float dt);
......@@ -39,6 +42,10 @@ public:
const float scaleFactor = 1;
const float distanceScale = 0.015;
Material playerIconMaterial;
Geometry playerIconGeometry;
std::map<Entity::Id, Entity> minimapItems;
Entity addPlanet(Transform::Handle sun, std::string n, double m, double r, double e, double a, double i, double N, double P, double T);
bool startup() override;
......@@ -52,6 +59,11 @@ public:
double solarToAU(double s);
double AUToSolar(double au);
double worldToSolar(double w);
double worldToAU(double w);
glm::dvec3 worldToAU(glm::dvec3 w);
void showTrajectories();
};
......@@ -14,6 +14,7 @@
#include <engine/scene/OrbitalSimulationSystem.hpp>
#include <engine/scene/Entity.hpp>
#include <engine/scene/Transform.hpp>
#include <engine/scene/Drawable.hpp>
#include <engine/scene/Planet.hpp>
......@@ -31,6 +32,9 @@ private:
Entity m_skyboxCamera;
Entity m_mainCamera;
Entity m_cockpitCamera;
Entity m_minimapCamera;
Entity playerIcon;
Entity parentEntity;
Transform::Handle cameraTransform;
......@@ -39,6 +43,7 @@ private:
Camera::Handle camera;
bool m_keyState[SDL_NUM_SCANCODES];
glm::vec2 mouseMove = glm::vec2(0, 0);
bool movementMode = 1;
double speed = 10;
......@@ -110,7 +115,12 @@ public:
}
void attachToParent(Entity e) {
if (parentEntity.valid() && parentEntity.has_component<Planet>()) {
m_orbitals->minimapItems[parentEntity.id()].component<Drawable>()->material.emissiveColor = glm::vec4(1.0, 0.0, 0, 1.0);
}
cameraTransform->parent = e.component<Transform>();
parentEntity = e;
m_orbitals->minimapItems[e.id()].component<Drawable>()->material.emissiveColor = glm::vec4(0.0, 1.0, 0, 1.0);
}
};
\ No newline at end of file
......@@ -5,7 +5,6 @@
#include <engine/audio/SoundSource.hpp>
#include <engine/scene/scenes/Console.hpp>
class AtmosphereTestScene : public Scene {
private:
OrbitalSimulationSystem* m_orbitals;
......@@ -13,13 +12,22 @@ private:
Console m_console;
Light::Handle sunLight;
Light::Handle sunLight, sunLight2;
Entity sun;
Entity sun2;
Entity skybox;
Entity loadingText;
Entity mercury;
Entity venus;
Entity earth;
Entity mars;
Entity jupiter;
Entity saturn;
Entity uranus;
Entity neptune;
Entity cockpit;
Entity cockpitSun;
Light::Handle cockpitSunLight;
......
......@@ -286,10 +286,26 @@ bool PlayerSystem::startup() {
cockpitCamTransform->position = glm::dvec3(0, 0, 0);
m_cockpitCamera.assign<Camera>(50, 0.01f, 50);
m_minimapCamera = m_scene->create();
auto camTransform = m_minimapCamera.assign<Transform>();
auto mmCam = m_minimapCamera.assign<Camera>(50, 0.1f, 200);
mmCam->mode = ProjectionMode::Orthographic;
camTransform->position = glm::vec3(0, 0, 0);
m_renderer->addRenderPass(m_skyboxCamera, "Skybox"_sh);
m_renderer->addRenderPass(m_mainCamera, "Main"_sh);
m_renderer->addRenderPass(m_cockpitCamera, "Cockpit"_sh);
m_renderer->addRenderPass(m_minimapCamera, "Minimap"_sh);
//m_renderer->setRenderPassOnlyTexture("Minimap"_sh, true);
playerIcon = m_scene->create();
playerIcon.assign<Drawable>(m_orbitals->playerIconGeometry, m_orbitals->playerIconMaterial, 0, m_renderer->getRenderPassId("Minimap"_sh));
auto itemTransform = playerIcon.assign<Transform>();
itemTransform->scale = { 0.4, 0.4, 0.4 };
itemTransform->position = glm::dvec3(0, 0, -70);
m_audio->setListener(m_mainCamera);
......@@ -384,15 +400,9 @@ void PlayerSystem::handleMouse(MouseEvent e) {
case SDL_MOUSEMOTION: {
// If the mouse is captured
if (SDL_GetRelativeMouseMode()) {
mouseMove = glm::vec2(0, 0);
// Rotate the camera based on the mouse movement
auto mouseMove = glm::dvec2(-(float)e.originalEvent.motion.xrel, -(float)e.originalEvent.motion.yrel);
auto up = rotate(glm::dvec3(0, 1, 0), glm::inverse(cockpitCamTransform->rotation));
cockpitCamTransform->rotation = glm::rotate(cockpitCamTransform->rotation, mouseMove.x * 0.001, up);
cockpitCamTransform->rotation = glm::rotate(cockpitCamTransform->rotation, mouseMove.y * 0.001, glm::dvec3(1, 0, 0));
cameraTransform->rotation = glm::rotate(cameraTransform->rotation, mouseMove.x * 0.001, up);
cameraTransform->rotation = glm::rotate(cameraTransform->rotation, mouseMove.y * 0.001, glm::dvec3(1, 0, 0));
mouseMove = glm::vec2(-(float)e.originalEvent.motion.xrel, -(float)e.originalEvent.motion.yrel);
}
break;
}
......@@ -416,7 +426,7 @@ void PlayerSystem::update(float dt) {
if (m_keyState[SDL_SCANCODE_F2]) movementMode = 0;
if (m_keyState[SDL_SCANCODE_F3]) movementMode = 1;
if (m_keyState[SDL_SCANCODE_F4]) setPosition(glm::vec3(0, -10000000, 0));
if (m_keyState[SDL_SCANCODE_F4]) setPosition(glm::vec3(0, 0, 1000000));
if (movementMode == 0) {
......@@ -442,7 +452,7 @@ void PlayerSystem::update(float dt) {
int rollDir = 0;
if (m_keyState[SDL_SCANCODE_LSHIFT]) speedMod = 10;
if (m_keyState[SDL_SCANCODE_LSHIFT]) speedMod = 500;
if (m_keyState[SDL_SCANCODE_W] || m_keyState[SDL_SCANCODE_UP]) rotDir -= glm::dvec2(0, 1);
if (m_keyState[SDL_SCANCODE_S] || m_keyState[SDL_SCANCODE_DOWN]) rotDir += glm::dvec2(0, 1);
......@@ -460,36 +470,56 @@ void PlayerSystem::update(float dt) {
rotDir = glm::dvec2(0, 0);
}
glm::dmat4 yprMatrix = glm::yawPitchRoll(rotDir.x * 0.01, rotDir.y * 0.01, rollDir * 0.01);
glm::dmat4 oldDir = directionRot;
glm::dmat4 yprMatrix = glm::yawPitchRoll(rotDir.x * 0.01, rotDir.y * 0.01, rollDir * 0.01);
cameraTransform->rotation = cameraTransform->rotation * yprMatrix;
skyboxCamTransform->rotation = skyboxCamTransform->rotation * yprMatrix;
directionRot = directionRot * yprMatrix;
cameraTransform->rotation = cameraTransform->rotation * yprMatrix;
//cameraTransform->rotation = cameraTransform->rotation * yprMatrix ;
//skyboxCamTransform->rotation = skyboxCamTransform->rotation * yprMatrix;
auto dir = normalize( rotate(glm::dvec3(0, 0, -1), directionRot));
cameraTransform->position += glm::normalize(glm::vec3(dir)) * static_cast<double>(dt) * velocity;
/*
auto up = rotate(glm::dvec3(0, 1, 0), glm::inverse(cockpitCamTransform->rotation));
cockpitCamTransform->rotation = glm::rotate(cockpitCamTransform->rotation, mouseMove.x * 0.001, up);
cockpitCamTransform->rotation = glm::rotate(cockpitCamTransform->rotation, mouseMove.y * 0.001, glm::dvec3(1, 0, 0));
glm::dmat4 diff = cockpitCamTransform->rotation * glm::transpose(oldDir);
//cameraTransform->rotation = cameraTransform->rotation * yprMatrix;
cameraTransform->rotation = diff * directionRot;
*/
//cameraTransform->rotation = glm::rotate(cameraTransform->rotation, mouseMove.x * 0.001, up);
//cameraTransform->rotation = glm::rotate(cameraTransform->rotation, mouseMove.y * 0.001, glm::dvec3(1, 0, 0));
mouseMove = glm::vec2(0, 0);
// Roll first
auto dir = normalize(directionRot * glm::vec4{ 0, 0, -1, 0 });
cameraTransform->position += glm::normalize(glm::vec3(dir)) * static_cast<double>(dt) * velocity;
//auto dir = normalize(directionRot * glm::vec4{ 0, 0, -1, 0 });
//cameraTransform->position += glm::normalize(glm::vec3(dir)) * static_cast<double>(dt) * velocity;
//cameraTransform->rotation = glm::rotate(cameraTransform->rotation, rollDir * 0.01, glm::dvec3(0, 0, 1));
auto up = rotate(camera->worldUp, glm::inverse(cameraTransform->rotation));
auto directionUp = rotate(glm::dvec3(0, 1, 0), glm::inverse(directionRot));
//auto up = rotate(glm::dvec3(0, 1, 0), glm::inverse(cameraTransform->rotation));
//auto directionUp = rotate(glm::dvec3(0, 1, 0), glm::inverse(directionRot));
//directionUp = glm::dvec3(normalize(cameraTransform->rotation * glm::vec4{ 0, 1, 0, 0 }));
cameraTransform->rotation = glm::rotate(cameraTransform->rotation, rotDir.x * 0.01, directionUp);
cameraTransform->rotation = glm::rotate(cameraTransform->rotation, rotDir.y * 0.01, glm::dvec3(1, 0, 0));
//cameraTransform->rotation = glm::rotate(cameraTransform->rotation, rotDir.x * 0.01, up);
//cameraTransform->rotation = glm::rotate(cameraTransform->rotation, rotDir.y * 0.01, glm::dvec3(1, 0, 0));
skyboxCamTransform->rotation = cameraTransform->rotation;
//skyboxCamTransform->rotation = cameraTransform->rotation;
directionRot = glm::rotate(directionRot, rotDir.x * 0.01, directionUp);
directionRot = glm::rotate(directionRot, rotDir.y * 0.01, glm::dvec3(1, 0, 0));
*/
//directionRot = glm::rotate(directionRot, rotDir.x * 0.01, directionUp);
//directionRot = glm::rotate(directionRot, rotDir.y * 0.01, glm::dvec3(1, 0, 0));
}
}
......@@ -510,9 +540,12 @@ void PlayerSystem::update(float dt) {
// If we drift away from the planet, stop following its orbit:
if (dist > r * 2.5 ) {
cameraTransform->position += cameraTransform->parent->position;
m_orbitals->minimapItems[parentEntity.id()].component<Drawable>()->material.emissiveColor = glm::vec4(1.0, 0.0, 0, 1.0);
cameraTransform->parent = cameraTransform->parent->parent;
camera->worldUp = glm::vec3(0, 1, 0);
//parentEntity = sun; //fixme
parentEntity = Entity(); //fixme
}
// Do a rudimentary collision detection:
......@@ -560,11 +593,18 @@ void PlayerSystem::update(float dt) {
cameraTransform->parent = transform;
velocity = 0;
parentEntity = p;
m_orbitals->minimapItems[parentEntity.id()].component<Drawable>()->material.emissiveColor = glm::vec4(0.0, 1.0, 0, 1.0);
break;
}
}
}
}
// Update the player icon:
glm::dvec3 oldPos = cameraTransform->thisGlobalTransform.pos;
oldPos = m_orbitals->worldToAU(oldPos);
playerIcon.component<Transform>()->position = glm::dvec3(oldPos.x, oldPos.z, oldPos.y - 70);
playerIcon.component<Transform>()->rotation = glm::rotate<double>(-M_PI / 2, glm::dvec3(1, 0, 0)) * directionRot;
}
void PlayerSystem::shutdown() {}
......
......@@ -40,6 +40,7 @@ void AtmosphereTestScene::switchConsole() {
m_console.pause();
m_renderer->setRenderPassActive("Main"_sh, true);
m_renderer->setRenderPassActive("Skybox"_sh, true);
m_renderer->setRenderPassActive("Minimap"_sh, true);
cockpitSoundSource->setVolume(0);
cockpitSoundSource->play();
} else {
......@@ -76,9 +77,11 @@ bool AtmosphereTestScene::startup() {
m_renderer->setRenderPassActive("Main"_sh, false);
m_renderer->setRenderPassActive("Skybox"_sh, false);
m_renderer->setRenderPassActive("Minimap"_sh, false);
m_renderer->addRenderPass(consoleCamera, "Console"_sh);
m_console.m_events = m_events;
m_console.m_renderer = m_renderer;
m_console.m_sceneGraph = m_sceneGraph;
......@@ -118,7 +121,7 @@ bool AtmosphereTestScene::startup() {
loadMainSceneResources();
switchToMainScene();
m_renderer->setRenderPassOnlyTexture("Console"_sh, true);
m_console.startup();
m_console.startup();
}
didOneFrame = true;
......@@ -127,10 +130,11 @@ bool AtmosphereTestScene::startup() {
return;
}
sunLight->dir = -glm::normalize(m_player->getWorldPosition());
cockpitSunLight->dir =
glm::vec3(glm::dvec4(sunLight->dir, 0) * m_player->getRotation());
if (isFocusedOnConsole) {
if (m_console.update(e, m_player->getKeyTable())) {
......@@ -217,6 +221,8 @@ bool AtmosphereTestScene::startup() {
}
void AtmosphereTestScene::switchToMainScene() {
{
auto skyboxPassId = m_renderer->getRenderPassId("Skybox"_sh);
......@@ -235,11 +241,24 @@ void AtmosphereTestScene::switchToMainScene() {
// Add a transform component to it so we are able to position it in space
auto sunTransform = sun.assign<Transform>();
// Add a Drawable component to it so the renderer has something to draw
sun.assign<Drawable>(sunGeometry, sunMaterial, 0, mainPassId);
sun.assign<Drawable>(sunGeometry, sunMaterial, 0, m_renderer->getRenderPassId("Main"_sh));
float scale = m_orbitals->solarRadius * m_orbitals->scaleFactor * 0.1;
sunTransform->scale = glm::dvec3(scale);
sunLight = sun.assign<Light>(glm::vec4(1, 1, 1, 3), glm::vec3(1, 0, 0),
false, LightType::DIRECTIONAL, mainPassId);
false, LightType::DIRECTIONAL, m_renderer->getRenderPassId("Main"_sh));
// Let's create a placeholder sun
sun2 = m_sceneGraph->create();
// Add a transform component to it so we are able to position it in space
auto sunTransform2 = sun2.assign<Transform>();
// Add a Drawable component to it so the renderer has something to draw
sun2.assign<Drawable>(sunGeometry, sunMaterial, 0, m_renderer->getRenderPassId("Minimap"_sh));
//float scale2 = m_orbitals->solarRadius * m_orbitals->scaleFactor * 0.1;
sunTransform2->scale = glm::dvec3(0.3, 0.3, 0.3);
sunTransform2->position = glm::dvec3(0, 0, -70);
sunLight2 = sun2.assign<Light>(glm::vec4(1, 1, 1, 1), glm::vec3(1, 0, 0),
false, LightType::POINT, m_renderer->getRenderPassId("Minimap"_sh));
// create a planet!
// Mass in solar masses, Radius in solar radii, Eccentricity, Semimajor
......@@ -247,9 +266,14 @@ void AtmosphereTestScene::switchToMainScene() {
// mass radius
//e
// a i N w
earth = m_orbitals->addPlanet(sunTransform, "Earth", 0.000002988,
0.009153735632184, 0.016713, 1.000000,
0.0000000, 0.00000, 4.93533, 0);
mercury = m_orbitals->addPlanet(sunTransform, "Mercury", 0.000000165956, 0.003505316091954, 0.205633, 0.387098, 0.1222500, 0.84153, 0.50768, 0);
venus = m_orbitals->addPlanet(sunTransform, "Venus", 0.00000243522, 0.008695402298851, 0.006778, 0.723330, 0.0592500, 1.33679, 0.95717, 0);
earth = m_orbitals->addPlanet(sunTransform, "Earth", 0.000002988, 0.009153735632184, 0.016713, 1.000000, 0.0000000, 0.00000, 4.93533, 0);
mars = m_orbitals->addPlanet(sunTransform, "Mars", 0.000000319716, 0.004870689655172, 0.093396, 1.523688, 0.0322851, 0.02333, 4.99858, 0);
jupiter = m_orbitals->addPlanet(sunTransform, "Jupiter", 0.000954265748, 0.1004468390805, 0.048482, 5.202560, 0.0227500, 1.75150, 4.77905, 0);
saturn = m_orbitals->addPlanet(sunTransform, "Saturn", 0.00028386, 0.08366666666667, 0.055580, 9.554750, 0.0434412, 1.98230, 5.92169, 0);
uranus = m_orbitals->addPlanet(sunTransform, "Uranus", 0.00004344552, 0.03643965517241, 0.047292, 19.18176, 0.0134948, 1.29060, 1.68516, 0);
neptune = m_orbitals->addPlanet(sunTransform, "Neptune", 0.0000512442, 0.03537643678161, 0.008598, 30.05814, 0.0002355, 2.29810, 4.76243, 0);
m_player->attachToParent(earth);
double r = earth.component<Transform>()->scale.x;
......@@ -318,7 +342,7 @@ void AtmosphereTestScene::switchToMainScene() {
consoleFront.assign<Drawable>(
consoleGeom,
Material{ glm::vec4{ 1, 1, 1, 1 }, glm::vec4{ 1, 1, 1, 1 },
m_renderer->getRenderPassTarget("Main"_sh), nullptr, nullptr,
m_renderer->getRenderPassTarget("Console"_sh), nullptr, nullptr,
skyboxMaterial.prog, false, RenderQueue::OPAQUE, GL_BACK },
0, cockpitPassId);
consoleFront.assign<Transform>();
......@@ -329,7 +353,7 @@ void AtmosphereTestScene::switchToMainScene() {
consoleBack.assign<Drawable>(
consoleGeom,
Material{ glm::vec4{ 1, 1, 1, 1 }, glm::vec4{ 1, 1, 1, 1 },
m_renderer->getRenderPassTarget("Console"_sh), nullptr, nullptr,
m_renderer->getRenderPassTarget("Minimap"_sh), nullptr, nullptr,
skyboxMaterial.prog, false, RenderQueue::OPAQUE, GL_BACK },
0, cockpitPassId);
consoleBack.assign<Transform>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment