-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Add SSRrPass (screen space refraction) #21420
Conversation
Looking good! Are you planning on ignoring the fragments that are occluded by other objects? |
Thanks! Yes, I'm doing on this. |
Done. But using the same on/off materials strategy like SSRPass which need re-render whole scene once more. |
ec95aa3
to
3042bc5
Compare
Hello @marcofugaro , I found the gaps in But for the whole artifacts before the background, For gaps at |
Solved this But now too accurate, if the rendered pixles not face camera ( like the ground below ) thus has large gap, will not pass the Still thinking about how to make up for this shortcoming. May let user choose each object between Or, read neighbor rendered pixels to from a plane then check intersection? EDIT: No, the holes on bunny's back are not caused by the gap between rendered ground pixels, it's caused by sphere and cone covering the ground. May only |
Tried to implement So now just add a overall |
@marcofugaro Solved! After the commits above, now just increase the Previously I think background's |
Thanks! |
I think this code will come in very handy for when we have to implement KHR_materials_ior, KHR_materials_translucency and KHR_materials_volume 👍 |
Amazing work! Does it works with screen space reflection shader? |
It would be great to be able to change the refractive index for every object in the scene |
@vinkovsky Thanks!
Not yet in the release, but I'm working on this #21487 , I think the same logic can use on SSRr too, copy the codes to your project first if necessary.
Threejs's compoer system can be connected in series, so simple answer is can. But I think It'll has problem and hard to choose use which first. I want to combine SSRPass and SSRrPass into something like SSRaytracePass, to make them truely work together and reuse the diffuse/depth/normal infos to improve performce. But the two existing Passes has much to be improved like the above one, so may need more time. |
Thanks for the quick response @gonnavis ! i appreciate your work! |
Add SSRrPass (screen space refraction), based on #20156 .
Demo