Commit dee8acff authored by Dario Seyb's avatar Dario Seyb

added normal calculation back in

parent 118bfc52
......@@ -18,15 +18,19 @@ out vec3 gTriDistance;
void main()
{
vec3 A = tPosition[2] - tPosition[0];
vec3 B = tPosition[1] - tPosition[0];
gNormal = -normalize(cross(A, B));
gPatchDistance = tPatchDistance[0];
gNormal = tNormal[0];
//gNormal = tNormal[0];
gTexCoord = tTexCoord[0];
gPosition = tPosition[0];
gTriDistance = vec3(1, 0, 0);
gl_Position = gl_in[0].gl_Position; EmitVertex();
gNormal = tNormal[1];
//gNormal = tNormal[1];
gTexCoord = tTexCoord[1];
gPosition = tPosition[1];
......@@ -34,7 +38,7 @@ void main()
gTriDistance = vec3(0, 1, 0);
gl_Position = gl_in[1].gl_Position; EmitVertex();
gNormal = tNormal[2];
//gNormal = tNormal[2];
gTexCoord = tTexCoord[2];
gPosition = tPosition[2];
......
......@@ -92,16 +92,16 @@ bool AtmosphereTestScene::startup() {
cockpitTransform->position = glm::dvec3(0, 0, 0);
cockpitDrawable->renderPassIndex = 1;
cockpitDrawable->visible = true;
auto cockpitLight = cockpit.assign<Light>(glm::vec4(1, 1, 1, 0.5), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
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, 1), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
blinkButton.assign<Light>(glm::vec4(1, 0.2, 0.2, 5), 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, 1), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
blinkButton.assign<Light>(glm::vec4(0, 0.2, 1.0, 5), glm::vec3(1, 0, 0), false, LightType::POINT, 1);
transform = blinkButton.assign<Transform>();
transform->parent = cockpitTransform;
transform->position = { -0.7655, -0.4545 , -1.643 };
......
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