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

Render Distance Fog #75

Open
ataulien opened this issue Aug 4, 2019 · 1 comment
Open

Render Distance Fog #75

ataulien opened this issue Aug 4, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@ataulien
Copy link
Contributor

ataulien commented Aug 4, 2019

In Gothic, distance fog serves as a way to limit the draw distance. Also it looks nicer:

The fog itself is just simple linear fog calculated by taking the distance of the camera position to the currently shaded vertex. The distance where the fog should start (near) and where it should end (far) are already calculated here:

mSkyColoring->calculateFogDistanceAndColor(near, far, fogColor);
// TODO: Use fog near and far
(void)near;
(void)far;

It seems like bsf does not support Fog at the moment, and even if it did we'd most likely have to implement it into our custom shaders anyways: https://github.com/REGoth-project/REGoth-bs/blob/master/content/shaders/World.bsl

@ataulien ataulien added the enhancement New feature or request label Aug 4, 2019
@ataulien
Copy link
Contributor Author

Looks like bsf does not support global shader variables just yet, so we would have to assign the distances and color to each material separately. That is highly inefficient, we need to get around that somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant