Commit 7136d5cf authored by Dario Seyb's avatar Dario Seyb

POLISH

parent 9e405726
......@@ -28,7 +28,7 @@ void main()
{
vec3 color = texture(uSamplerColor, vTexCoord).rgb;
color *= 3; // Hardcoded Exposure Adjustment
color *= 4; // Hardcoded Exposure Adjustment
float ExposureBias = 2.0f;
vec3 curr = Uncharted2Tonemap(ExposureBias*color);
......@@ -36,6 +36,8 @@ void main()
vec3 whiteScale = vec3(1.0f)/Uncharted2Tonemap(vec3(W));
color = curr*whiteScale;
vec2 centerDist = abs(vTexCoord * 2.0 - 1.0);
color *= length(vec2(1.0) - centerDist);
vec3 retColor = pow(color, vec3(1.0/2.2));
retColor += vec3(rand(gl_FragCoord.xy) * 1.0/255 - 0.5/255);
......
......@@ -40,6 +40,7 @@ private:
Geometry cockpitGeometry, sunGeometry, skyboxGeometry;
Geometry consoleGeom, consoleFrontLeftGeom, consoleFrontRightGeom, consoleBackLeftGeom, consoleBackRightGeom, consoleMiddleLeftGeom, consoleMiddleRightGeom, windShieldGeom;
SharedTexture2D outOfOrderTexture;
std::shared_ptr<Sound> soundTrackIntro, soundTrackMain;
......
......@@ -321,7 +321,7 @@ void AtmosphereTestScene::switchToMainScene() {
consoleFrontLeft.assign<Drawable>(
consoleFrontLeftGeom,
Material{ glm::vec4{ 1, 1, 1, 1 }, glm::vec4{ 1, 1, 1, 1 },
nullptr, nullptr, nullptr,
outOfOrderTexture, nullptr, nullptr,
skyboxMaterial.prog, true, RenderQueue::OPAQUE, GL_NONE },
0, cockpitPassId);
consoleFrontLeft.assign<Transform>();
......@@ -330,7 +330,7 @@ void AtmosphereTestScene::switchToMainScene() {
consoleFrontRight.assign<Drawable>(
consoleFrontRightGeom,
Material{ glm::vec4{ 1, 1, 1, 1 }, glm::vec4{ 1, 1, 1, 1 },
nullptr, nullptr, nullptr,
outOfOrderTexture, nullptr, nullptr,
skyboxMaterial.prog, true, RenderQueue::OPAQUE, GL_NONE },
0, cockpitPassId);
consoleFrontRight.assign<Transform>();
......@@ -348,7 +348,7 @@ void AtmosphereTestScene::switchToMainScene() {
consoleBackRight.assign<Drawable>(
consoleBackRightGeom,
Material{ glm::vec4{ 1, 1, 1, 1 }, glm::vec4{ 1, 1, 1, 1 },
nullptr, nullptr, nullptr,
outOfOrderTexture, nullptr, nullptr,
skyboxMaterial.prog, true, RenderQueue::OPAQUE, GL_NONE },
0, cockpitPassId);
consoleBackRight.assign<Transform>();
......@@ -358,19 +358,19 @@ void AtmosphereTestScene::switchToMainScene() {
consoleMiddleLeft.assign<Drawable>(
consoleMiddleLeftGeom,
Material{ glm::vec4{ 1, 1, 1, 1 }, glm::vec4{ 1, 1, 1, 1 },
nullptr, nullptr, nullptr,
outOfOrderTexture, nullptr, nullptr,
skyboxMaterial.prog, true, RenderQueue::OPAQUE, GL_NONE },
0, cockpitPassId);
consoleMiddleLeft.assign<Transform>();
consoleMiddleLeft.assign<Transform>()->scale = { -1, 1, 1 };
auto consoleMiddleRight = m_sceneGraph->create();
consoleMiddleRight.assign<Drawable>(
consoleMiddleRightGeom,
Material{ glm::vec4{ 1, 1, 1, 1 }, glm::vec4{ 1, 1, 1, 1 },
nullptr, nullptr, nullptr,
outOfOrderTexture, nullptr, nullptr,
skyboxMaterial.prog, true, RenderQueue::OPAQUE, GL_NONE },
0, cockpitPassId);
consoleMiddleRight.assign<Transform>();
consoleMiddleRight.assign<Transform>()->scale = { -1, 1, 1 };
auto windShield = m_sceneGraph->create();
windShield.assign<Drawable>(
......@@ -396,7 +396,7 @@ void AtmosphereTestScene::loadMainSceneResources() {
skyboxGeometry = {vaoSkybox};
skyboxMaterial = {glm::vec4{1, 1, 1, 1},
glm::vec4{0.15, 0.15, 0.15, 1},
glm::vec4{0.05, 0.05, 0.05, 1},
skyboxTexture,
nullptr,
nullptr,
......@@ -449,7 +449,7 @@ void AtmosphereTestScene::loadMainSceneResources() {
cockpitGeometry = {vaoCockpit};
windshieldMaterial = Material{ glm::vec4{ 0.2, 0.3, 1.0, 0.6 }, glm::vec4{ 0.02, 0.03, 0.1, 1 },
windshieldMaterial = Material{ glm::vec4{ 0.2, 0.3, 1.0, 0.2 }, glm::vec4{ 0.02, 0.03, 0.05, 1 },
Texture2DFileManager::the()->get(Texture2DCreator(
"cockpit_v2/"
"windshield_DefaultMaterial_AlbedoTransparency.png")),
......@@ -465,6 +465,9 @@ void AtmosphereTestScene::loadMainSceneResources() {
consoleMiddleRightGeom = Geometry{ VertexArrayObjectCreator("cockpit/cockpit_v2_console_middle_right.obj").create() };
windShieldGeom = Geometry{ VertexArrayObjectCreator("cockpit/cockpit_v2_windshield.obj").create() };
outOfOrderTexture = Texture2DFileManager::the()->get(Texture2DCreator("cockpit_v2/outoforder.png"));
soundTrackIntro = m_audio->createSound("GameAmbient.mp3", SoundMode::MODE_2D);
soundTrackMain = m_audio->createSound("SpaceTheme.mp3", SoundMode::MODE_2D);
......
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