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

Added basic level fog preview #322

Merged
merged 2 commits into from Oct 1, 2015
Merged

Added basic level fog preview #322

merged 2 commits into from Oct 1, 2015

Conversation

Monsterovich
Copy link
Contributor

What changed:

  • Removed default global fog, added custom fog which can be configured from UDMF (fade color) or ACS scripts (Sector_SetFade).
  • Fixed some sector/line update issues with color/fog in "checkVisibleFlats".
  • Added new CVAR render_fog_distance (default: 1000)

fog

Fog enabled:
foge
Fog disabled:
fogd

@sirjuddington
Copy link
Owner

Hmm, I'm not sure how (G)ZDoom handles custom fog colours in relation to sector light levels, but this currently breaks any 'normal' sectors since it removes the original fog distance calculations and makes it static, which means bright sectors have the same fog distance as dark sectors, which isn't quite right (take a look at Doom2 MAP01 with this and you'll immediately notice the problem)

It should probably keep the original distance calculation if a sector doesn't have custom fog, and use the new one if it is custom.

@Monsterovich
Copy link
Contributor Author

Now it should be better. Read all changes here: https://github.com/Monsterovich/SLADE/commit/e197f5807c2eb90d4761b19fdc39036f5975ee36

and some screenshots:
Old formula:
oldformula
New formula:
newformula
(I know that fog is very dense. I didn't find the best value for render_fog_distance.)

- Fixed possible bug that can crash the editor if thing is outside the
map.
- Changed render_fog_distance default from 1000 to 1500. IMO it looks
better.
- Added new CVAR render_fog_new_formula:

if it's true, then slade will use the new formula for custom fog that
doesn't have sector light calculations and it has custom distance (I
mean render_fog_distance)
if it's false, then slade will use the old formula.

slade is always using the old formula when the fog color is default
@Monsterovich
Copy link
Contributor Author

Will you merge these changes or I should fix something else? :3

@sirjuddington
Copy link
Owner

Once I've tested out the changes (looks fine from the code though)

sirjuddington added a commit that referenced this pull request Oct 1, 2015
Added basic level fog preview
@sirjuddington sirjuddington merged commit 22a479f into sirjuddington:3.1.1 Oct 1, 2015
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