Commit e706fa77 authored by Dario Seyb's avatar Dario Seyb

vll was vergessen

parent da111aed
This diff is collapsed.
This diff is collapsed.
......@@ -49,4 +49,5 @@ void main()
history = clamp(history, minNeighbour, maxNeighbour);
oColor = mix(current, history, factor);
oColor.a = clamp(oColor.a, 0, 1);
}
......@@ -76,16 +76,30 @@ bool AtmosphereTestScene::startup() {
.attributeLocations(vaoCockpit->getAttributeLocations())
.fragmentDataLocations(m_renderer->getGBufferLocations()).create();
Material cockpitMaterial{ glm::vec4{1, 1, 1, 1}, glm::vec4{0.05, 0.05, 0.05, 1}, checkboardTexture, cockpitShader, true, RenderQueue::OPAQUE };
Geometry cockpitGeom{ vaoCockpit };
cockpitGeom.vao->setMode(GL_PATCHES);
cockpit = m_sceneGraph->create();
auto cockpitDrawable = cockpit.assign<Drawable>(cockpitGeom, cockpitMaterial);
auto cockpitTransform = cockpit.assign<Transform>();
cockpitTransform->position = glm::dvec3(0, 0, 0);
cockpitDrawable->renderPassIndex = 1;
cockpitDrawable->visible = true;
auto cockpitLight = cockpit.assign<Light>(glm::vec4(1, 1, 1, 1), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
{
Material cockpitMaterial{ glm::vec4{0.4, 0.4, 0.4, 1}, glm::vec4{0, 0, 0, 1}, checkboardTexture, cockpitShader, true, RenderQueue::OPAQUE };
Geometry cockpitGeom{ vaoCockpit };
cockpitGeom.vao->setMode(GL_PATCHES);
cockpit = m_sceneGraph->create();
auto cockpitDrawable = cockpit.assign<Drawable>(cockpitGeom, cockpitMaterial);
auto cockpitTransform = cockpit.assign<Transform>();
cockpitTransform->position = glm::dvec3(0, 0, 0);
cockpitDrawable->renderPassIndex = 1;
cockpitDrawable->visible = true;
auto cockpitLight = cockpit.assign<Light>(glm::vec4(1, 1, 1, 0.2), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
auto blinkButton = m_sceneGraph->create();
blinkButton.assign<Light>(glm::vec4(1, 0.2, 0.2, 2), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
auto transform = blinkButton.assign<Transform>();
transform->parent = cockpitTransform;
transform->position = { 0.7655, -0.4545 , -1.643 };
blinkButton = m_sceneGraph->create();
blinkButton.assign<Light>(glm::vec4(0, 0.2, 1.0, 2), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
transform = blinkButton.assign<Transform>();
transform->parent = cockpitTransform;
transform->position = { -0.7655, -0.4545 , -1.643 };
}
m_events->subscribe<SimulateEvent>([this](const SimulateEvent& e) {
sunLight->dir = -glm::normalize(m_player->getWorldPosition());
......
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