Sign in to follow this  
Aaron Smith

DirectX12 - Screen Space Reflection Artefacts

Recommended Posts

Hello Everyone

I am currently looking into screen space reflections and seemed to have made some progress and now stumbled into some artefacts.

I was wondering if anything screams out that is wrong with these images? 

I get the artefact under the car where its slightly not touching and im assuming the reflection goes under car and its sampling incorrectly, but I cant figure out a way to either fade it out or ignore this type of artefact. Would it involve comparing the reflection direction with the normal at that pixel sampled?
http://imgur.com/a/qGA5r

http://imgur.com/a/96lTv

The other issue is when the camera is looking down towards the normals of the surface and the reflections seem to stretch and look nasty :) I am guessing I need to not perform the reflection if the angle between the eye to pos and the normal is close together?

I am happy to throw any code up that may be useful 

Thanks

PS. I do know the models are just placeholders and the wheels are the wrong way round haha The scene will be built properly once the reflections are fixed

Share this post


Link to post
Share on other sites

Generally the SSR would be scaled by AO which would leave the area under the car dark.

edit 1: On the 2nd question, scale the SSR down as the angle between the surface normal and the direction to the camera approaches zero. A lot of modern engines here would blend towards an environment cubemap in the same way that they would if the SSR ray never collided with the scene.

edit 2: (Just realized hours later what was bugging me about it) Regarding the initial artifact, you want to fade out the SSR when the sampling point's depth is closer to the camera than the reflection point, rather than comparing the angle between the normal and view vector.

Edited by Digitalfragment

Share this post


Link to post
Share on other sites
Hi Digitalfragment

Thank you so much for replying I will have a look at these today and try get them done :)

Ye I would of likes to got the environment map working but as it would get 0 marks I can't do it atm

I do have to also do ssao so that will be next :) I tried a crude way to get shadows but the result was crude as when you sample the depth you have no idea if the area is blocked behind so I get just blocks of shadow

Thank you

Share this post


Link to post
Share on other sites

Hi all, Just wanted to add another question here as i am working on this today, so far my reflections are with a full smooth surface but now I would like to implement rough surfaces. with my understanding I am heading towards multiple rays being fired off and an average of them would be the result.

 

I keep seeing BRDF come up so am assuming this is something I need to use. Is there any decent tutorials or guides on this relating to c++ code?

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this