Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sky color #36

Merged
merged 2 commits into from
Jun 26, 2019
Merged

Sky color #36

merged 2 commits into from
Jun 26, 2019

Conversation

ataulien
Copy link
Contributor

@ataulien ataulien commented May 29, 2019

Ports some of the Sky-Logic from the old REGoth repository. This PR adds a component to the GameWorld, which calculates the sky color depending on the daytime using the Gothic 2 sky colors.

To test this, one can modify GameClock from this:

constexpr float CLOCK_SPEED_FACTOR  = SECONDS_IN_A_DAY/6000;

to

constexpr float CLOCK_SPEED_FACTOR  = SECONDS_IN_A_DAY/60;

for 60 second days.

[WIP]: Color is not applied to any meshes now, only the clear color is modified.
Using an indoor-world like OLDMINE.ZEN works for testing, but you need to peek through the wall with your camera to see the effect.

Also #35 should be merged first.

@ataulien ataulien changed the title Sky color [WIP] Sky color May 29, 2019
src/sky/SkyColoring.cpp Outdated Show resolved Hide resolved
src/sky/SkyColoring.cpp Outdated Show resolved Hide resolved
src/sky/SkyColoring.cpp Outdated Show resolved Hide resolved
@mworchel
Copy link
Contributor

Doesn't work for me. The sky stays blue in G1 and G2, no matter the world. It seems you forgot to commit the part where the Sky component is added to a scene object.

@ataulien
Copy link
Contributor Author

Hmm, I remember amending that to the commit. I can't check what went wrong currently though. If you want, you can simply add the Sky component to the game world. Nothing else is required.

@mworchel
Copy link
Contributor

mworchel commented Jun 1, 2019

When manually adding the component to the game world, the sky color does seem to change according to the time. Did you figure out what went wrong?

@ataulien ataulien force-pushed the sky-color branch 4 times, most recently from c824bf4 to f96f94a Compare June 15, 2019 18:56
@ataulien ataulien force-pushed the sky-color branch 2 times, most recently from c335a98 to c6c5b15 Compare June 15, 2019 19:13
@ataulien ataulien changed the title [WIP] Sky color Sky color Jun 15, 2019
@mworchel
Copy link
Contributor

Works.

@mworchel mworchel merged commit 8adadcb into master Jun 26, 2019
@ataulien ataulien deleted the sky-color branch July 4, 2019 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants