Skip to content

Conversation

@antokhio
Copy link
Contributor

Seems DoF had issues if stage set to Transparent, set it to AfterScene

@bj-rn
Copy link
Owner

bj-rn commented Jan 10, 2025

The issue with AfterScene is that the atmosphere will be in front of all objects in the scene. So you can't have a moon circling the planet and obscuring the atmosphere for example.

Don't know what's the best solution. Maybe have the Renderstage as input so one can decide from case to case?

@bj-rn
Copy link
Owner

bj-rn commented Jan 10, 2025

Or could there be two objects one on Transparent and visible and another one (invisible) that only renders into the depthbuffer?

@antokhio
Copy link
Contributor Author

antokhio commented Jan 11, 2025

Yes, I noticed that problem too. I suspect the current way to go is to expose additional params like stage...

I've checked the source also, and it seems to have kind'a same problem:

image
But it feels like it has correct behavior, atmosphere should be only where there is no depth...
Not sure how to set that up with stride. FakeAtmosphere.zip

Gonna play around with it a bit more...

@bj-rn
Copy link
Owner

bj-rn commented Feb 12, 2025

Added DepthStencilStateDescription and DoF seems to be working now.

image
image
image

@antokhio
Copy link
Contributor Author

antokhio commented Feb 14, 2025

image
Hey, thanks for looking in to it. Still same issue here.

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.

2 participants