Commit 72fa81e7 authored by Dario Seyb's avatar Dario Seyb

fixed minimap

parent 681a07c1
#define LAST_SHADER VERTEX
#pragma import "../CommonDeferredVert.glsl"
vec3 normal() {
......@@ -10,8 +9,7 @@ vec2 texCoord() {
}
vec3 position() {
vec4 modelPos = vec4(aPosition, 1.0) ;
vec4 worldPosition = uViewProjectionMatrix * uModelMatrix * modelPos;
gl_Position = worldPosition;
vec4 modelPos = vec4(aPosition, 1.0);
vec4 worldPosition = uModelMatrix * modelPos;
return worldPosition.xyz;
}
}
\ No newline at end of file
......@@ -2,7 +2,6 @@
#pragma import "CommonDeferredFrag.glsl"
void initShader(){};
vec4 color() {
......@@ -14,9 +13,9 @@ vec4 emissive() {
}
vec3 normal() {
return vNormal;
return inNormal;
}
vec4 specularSmoothness() {
return vec4(1, 1, 1, 1);
return vec4(0);
}
......@@ -10,7 +10,6 @@ vec2 texCoord() {
vec3 position() {
vec4 modelPos = vec4(aPosition, 1.0);
vec4 worldPosition = uViewProjectionMatrix * uModelMatrix * modelPos;
gl_Position = worldPosition;
vec4 worldPosition = uModelMatrix * modelPos;
return worldPosition.xyz;
}
\ No newline at end of file
......@@ -38,7 +38,7 @@ bool OrbitalSimulationSystem::startup() {
orbitTorus = { vaoCircle };
orbitTorus.vao->setMode(GL_LINES);
glLineWidth(10);
glLineWidth(6);
minimapItem = Geometry{ VertexArrayObjectCreator("circle_filled.obj").create() };
playerIconGeometry = Geometry{ VertexArrayObjectCreator("cone.obj").create() };
......@@ -122,7 +122,7 @@ bool OrbitalSimulationSystem::startup() {
GL_BACK};
trajectoryMat = {glm::vec4(1.0, 1.0, 1.0, 1.0),
glm::vec4(1, 0, 0, 1),
glm::vec4(1.0f, 0.1f, 0, 1.5),
texture,
nullptr,
nullptr,
......
......@@ -83,7 +83,6 @@ bool AtmosphereTestScene::startup() {
m_renderer->addRenderPass(consoleCamera, "Console"_sh, ScreenSpaceSize::HALF);
m_console.m_events = m_events;
m_console.m_renderer = m_renderer;
m_console.m_sceneGraph = m_sceneGraph;
......@@ -249,10 +248,11 @@ void AtmosphereTestScene::switchToMainScene() {
sun2 = m_sceneGraph->create();
// Add a transform component to it so we are able to position it in space
auto sunTransform2 = sun2.assign<Transform>();
sunMaterial.emissiveColor.a = 3.0;
// 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->scale = glm::dvec3(0.4, 0.4, 0.4);
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));
......
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