Skip to content

Commit

Permalink
Don't try to render clouds if we don't have shader for them
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Apr 27, 2023
1 parent 000ba8b commit 07bc037
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Layers/xrRender/dxEnvironmentRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ void dxEnvironmentRender::RenderSky(CEnvironment& env)

void dxEnvironmentRender::RenderClouds(CEnvironment& env)
{
if (!clouds_sh)
return;

GEnv.Render->rmFar();

Fmatrix mXFORM, mScale;
Expand Down

3 comments on commit 07bc037

@Xottab-DUTY
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johncurley
Copy link
Contributor

@johncurley johncurley commented on 07bc037 Apr 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this can be replicated using DirectX's volumetric fog or something. Here's an article for OpenGL that shows how to do it without shaders but we can probably replicate that for DirectX.

https://vvise.iat.sfu.ca/user/data/papers/clouds.pdf

That's a very simple example with a bounding box. Another algorithm that is more advanced seems to be using a particle queue:

http://www.markmark.net/PDFs/RTCloudsForGames_HarrisGDC2002.pdf

@Xottab-DUTY
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this can be replicated using DirectX's volumetric fog or something. Here's an article for OpenGL that shows how to do it without shaders but we can probably replicate that for DirectX.

vvise.iat.sfu.ca/user/data/papers/clouds.pdf

That's a very simple example with a bounding box. Another algorithm that is more advanced seems to be using a particle queue:

http://www.markmark.net/PDFs/RTCloudsForGames_HarrisGDC2002.pdf

@johncurley, can you post this in #1313? :)

Please sign in to comment.