Monday, August 14, 2017

Notes On Screen Space HIZ Tracing

Note: The Markdown version of this document is available and might have better formatting on phones/tablets.

The following is a small gathering of notes and findings that we made throughout the implementation of hiz tracing in screen space for ssr in Stingray. I recently heard a few claims regarding hiz tracing which motivated me to share some notes on the topic. Note that I also wrote about how we reproject reflections in a previous entry which might be of interest. Also note that I've included all the code at the bottom of the blog.

The original implementation of our hiz tracing method was basically a straight port of the "Hi-Z Screen-Space Tracing" described in GPU-Pro 5 by Yasin Uludag. The very first results we got looked something like this:

Original scene:

Traced ssr using hiz tracing:

Artifacts

The weird horizontal stripes were reported when ssr was enabled in the Stingray editor. They only revealed themselves for certain resolution (they would appear and disappear as the viewport got resized). I started writing some tracing visualization views to help me track each hiz trace event:

Using these kinds of debug views I was able to see that for some resolution, the starting position of a ray when traced at half-res happened to be exactly at the edge of a hiz cell. Since tracing the hiz structure relies on intersecting the current position of a ray with the boundary of cell it lies in, it means that we need to do a ray/plane intersection. As the numerator of (planes - pos.xy)/dir.xy got closer and closer to zero the solutions for the intersection started to loose precision until it completely fell apart.

To tackle this problem we snap the origin of each traced rays to the center of a hiz cell:

Rays traced with and without snapping to starting pos of the hiz cell center:

This looked better. However it didn't address all of the tracing artifacts we were seeing. The results were still plagued with lots of small pixels whose traced rays failed. When investigating these failing cases I noticed that they would sometimes get stuck for no apparent reason in a cell along the way. It also occurred more frequently when rays travelled in the screen space axes (±1,0) or (0,±1). After drawing a bunch of ray diagrams on paper I realized that the cell intersection method proposed in GPU-Pro had a failing case! To ensure hiz cells are always crossed, the article offsets the intersection planes of a cell by a small offset. This is to ensure that the intersection point crosses the boundaries of the cell it's intersecting so that the trace continues to make progress.

While this works in most cases there is one scenario which results in a ray that will not cross over into the next hiz cell (see diagram bellow). When this happens the ray wastes the rest of it's allocated trace iterations intersecting the same cell without ever crossing it. To address this we changed the proposed method slightly. Instead of offsetting the bounding planes, we choose the appropriate offset to add depending on which plane was intersected (horizontal or vertical). This ensures that we will always cross a cell when tracing:

Ray Marching Towards the Camera

At the end of the GPU-Pro chapter there is a small mention that raymarching towards the camera with hiz tracing would require storing both the minimum and maximum depth value in the hiz structure (requiring to bump the format to a R32G32F format). However if you visualize the trace of a ray leaving the surface and travelling towards the camera (i.e. away from the depth buffer plane) then you can simply acount for that case and augment the algorithm described in GPU-Pro to navigate up and down the hierarchy until the ray finds the first hit with a hiz cell:

This has proven to be fairly solid and enabled us to trace a wider range of the screen space:

Ray Marching Behind Surfaces

Another alteration that can be made to the hiz tracing algorithm is to add support for rays to travel behind surface. Of course to do this you must define a thickness to the surface of the hiz cells. So instead of tracing against extruded hiz cells you trace against "floating" hiz cells.

With that in mind we can tighten the tracing algorithm so that it cannot end the trace unless it finds a collision with one of these floating cells:

Unfortunately this often means that the traced rays travelling behind a surface degenerate into a linear search and the cost can skyrocket for these traced pixels:

Number of iterations to complete the trace (black=0, red=64):

The Problem of Tracing a Discrete Depth Buffer

For me the most difficult artifact to understand and deal with when implementing ssr is (by far) the implications of tracing a discreet depth buffer. Unless you can fully commit to the idea of tracing objects with infinite thicknesses, you will need to use some kind of depth threshold to mask a reflection if it's intersection with the geometry is not valid. If you do use a depth threshold then you can (will?) end up getting artifacts like these:

The problem as far as I understand it, is that rays can osciliate from passing and failing the depth threshold test. It is essentially an amplified alliasing problem caused by the finite resolution of the depth buffer:

I have experimented with adapting the depth threshold based on different properties of the intersection point (direction of reflected ray, angle of insidence at intersection, surface inclination at intersection) but I have never been able to find a silver bullet (or anything that resembles a bullet to be honest). Perhaps a good approach could be to interpolate the depth value of neighboring cells if the neighbors belong to the same geometry? I think that Mikkel Svendsen proposed a solution to this problem while presenting Low Complexity, High Fidelity: The Rendering of "INSIDE" but I have yet to wrap my head around the proposed solution and try it.

All or Nothing

Finally it's worth pointing out that hiz tracing is a very "all or nothing" way to find an intersection point. Neighboring rays that exhaust their maximum number of allowed iterations to find an intersection can end up in very different screen spaces which can cause a noticeable discontinuity in the ssr buffer:

This is something that can be very distracting and made much worst when dealing with a jittered depth buffer when combined with taa. This side-effect should be considered carefully when choosing a tracing solution for ssr.

One more interesting software to get Facebook videos is Video downloader for Facebook by FB2Mate. It can extract MP3 from Facebook videos or convert them to MP4, MOV, WMV, AVI, MKV, 3GP, MPEG or to most popular portable gadgets with iOS or Android.

Suddenlink Communications is an American broadcast communications backup of Altice USA which has practical experience in digital TV, fast web, broadband telephone, home security and promoting.Visit for more :- Suddenlink Customer Service

GB WhatsApp plus is a standout amongst the best applications for informing and visiting. You will have huge amounts of choices and highlights which are not accessible in any talking application.Download gbwhatsapp whatsopp net

Nice post. I learn something totally new and challenging on websites I stumbleupon every day. It's always useful to read through articles from other authors and practice something from other sites. Thanks for sharing this information with us. Download Free Xmod and information. Repo APK

Get stuck into any Lexmark Printer Support issue? Whip out your phone and dial the toll-free phone number of Lexmark printer customer support and fix your issues within no time. Also, get 24/7 service from technical experts.

Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!pubg mobile apkpubg litepubg apkpubg mobile lite

Get House of Fun Free Coin. Collect new update Hof free coins 2019 and Hof free spin. Get House of Fun Coins and Claim House of Fun Slot freebies.House Of Fun is favorite choice among people from United States. We all enjoy this game so much but to continue game need house of fun coins.Collect House of Fun Slots Free Coins & Spins You can only collect each bonus one time.https://houseoffuncoins.com/

AFK Arena Tier List the top best heroes in the game to focus on at the very beginning and to the till end. Let's have a look at our AFK Arena.AFK Arena Before beginning the game, you should know all the details about your heroes. For the different stages, like early, mid.Find the best heroes for your team in this AFK Arena tier list. Heroes are ranked based on how useful they are and how much value they bring.https://afkarenatierlist.com

updatesDigital marketing encompasses all marketing efforts that use an electronic device or the internet. Businesses leverage digital channels such as search engines, social media, email, and other websites to connect with current and prospective customers.

Mobile marketing is the interactive multichannel promotion of products or services for mobile phones and devices, smartphones and networks. Mobile marketing channels are diverse and include technology, trade shows or billboards.

Ricoh is one of the all-in-one printers across the world. Ricoh printers are user-friendly and it can tackle all your business printing needs. So, the next time you face any problem with printer installation, drivers update, paper jamming, etc., then feel free to dial our ricoh printer support number.

TurboTax software is designed to be simple to use and function efficiently. Whenever you run into some trouble with your TurboTax, dial our turbotax toll-free number. The number is online 24/7 to enhance user experience and make your life easier.

Quicken is the most equipped and powerful money management tool. It allows the user keeping a real-time track of their income, expenditures, loans and bills at one place. Quicken is a user-friendly application tool for every computer or smart phones. If you are getting stuck in using Quicken software, call our quicken support team for assistance. Our team of professional experts will be there 24/7 to help.

are you ready for go in pochinki sab ka baap its really hot sexy game its an real game go and eat chicken today pubgpro officialToday is chicken dinnerget back to pochinkiExplore your teamits a game that we are a chor policepubg is the bestdon't wait only play pubg boys

Everything seems convenient on access as the technology evolves. Using this HP LaserJet Pro MFP M281FDW printer, pull out your connecting wires on the same stretch and do it with the wireless port connectivity. This makes consumers completely happy during printing operations.After you complete the HP LaserJet Pro MFP M281FDW Wireless Printer Setup, you can enjoy printing using the printer.But if you have any queries on the HP LaserJet Pro MFP M281FDW Wireless Setup, please feel free to contact the active customer care team @ +1-888-214-1820.

Many pages contain both types of content, one that you’d like to show to search engines and the other that you’d prefer onlyAryan Tripathi for human visitors. These could include ads, login-restricted information, or links. You can show general users the plain version and cookie-accepting visitors the extended data.

If you have a content that you want the visitors to view only after completing the registration, then you can create a page with a short snippet offering to Aryan Tripathi continue reading once the user registration process is completed otherwise the visitor won’t be able to access it.

Growing your followers on social media Aryan Tripathi will help you increase word of mouth and referrals. Our social media marketing services will help you increase your followers with relevant people. We will ensure that your followers match the demographics, interests, and behaviors of your typical customers.

Increasing your website traffic willAryan Tripathi Food Comes Home directly influence leads and sales. We will focus on developing social media advertising campaigns that drive high Aryan Tripathi Food Comes Home volumes of traffic to your website. To increase conversions, we can add-on retargeting ads to stay in front of recent website visitors.

You will be assigned a dedicated social media manager Aryan Tripathi Moto Squad to develop your strategy and execute it. This person will learn your business and be your primary contact. You will be able to communicate with your social media manager daily via email or schedule a call at a time that is convenient for the both of us

This Article is Really Fantastic And Thanks For Sharing The Valuable Post..Issues With Quicken Software Dial Or Visit Quicken Technical Support Phone Number Get Instant Help and Support from Quicken Certified Experts.You Do Not Want To Get Hold Of The Quicken Support Online Or Be Looking For Opening Hours For Quicken Support Team.

Two-factor authentication not working properly Blockchain two-factor authentication is surely a jack in the ANTI FRAUD Blockchain account as holds the key to protection and security of the account. If it is not working properly or having endless trouble in solving it, you can immediately ask for support from the team of elite experts who are always there to handle you. You can call on Blockchain helpdesk number which is approachable from every corner of the world. Talk to the masterminds of the exchange to get splendid solutions.

Login issues are annoying and time-consuming Gemini customer support +1-(833) 993-0690 at the same time. Without logging in your account, you cannot access your account. If you want to resolve login issues immediately, you can get in touch with the experts who can fix all your queries with numerous solutions. To reach out the professionals, you can dial Gemini toll free helpdesk number and discuss the problem, you are facing in Gemini. Get the best support from team in your difficult time. Speak to the team and access solutions that are easy to execute and can be remember for long term.Gemini Customer Support NumberGemini Support Phone NumberGemini Toll Free NumberGemini Support Number

Are you facing verification issues due to mobile app on Binance account? This is the most apparent error faced by every user at verification time. To get rid of such errors, you can dial Binance support helpdesk number and fetch required solutions and inventive remedies from the professionals in no time. The customer care experts will put all their efforts in delivering the most suitable solutions to the users. You can avail their customer support seamless services at any time without any issue and as per your convenience. Binance customer service +1 (833) 993-0690 Binance Support Phone Number Binance Support Number Binance Customer Support

Binance Customer Support +1-833-993-0690 Are you dealing with sign up issues in a Binance account? Is this error bothering you and you’re looking for steps to get rid of this error? If you have no solution to end all these errors, you can always look for ways to deal with such issues, therefore, call on Binance Customer Support which is functional and the easiest pathway to get rid of queries in no time. The team is always functional and ready to assist users anytime. Talk to the team for the better results and speak to the experts anytime and get solutions related to your queries.Binance Helpline Number 1 (833) 993-0690 Binance helpdesk number https://www.bc-cn.info/

Is your Binance account occupied by hacking attempts? If you ever been in any situation and looking for solutions to deal with errors, you can always take help from the team of skilled professionals who are there to guide you. Call on Binance support number which is functional all the time for serving quality solutions. Whenever you are in doubt, you can take support from the team of experts who are there to guide you at every step. The team is always at service , therefore, you are required to contact them for dealing with quality solutions. Whenever you want the help, the team will be by your side to provide immense support. Binance Customer Service +1(833) 993-0690Binance Support NumberBinance Customer SupportBinance Support Phone Number

Binance Phone Number +1 (833) 993-0690 Binance Withdrawal Issue.Are you the customer of Binance wallet? Is your account password hacked? You don’t have to worry. We have our team experts who will help you to reset your password. The client has to take one step forward and get in touch with Binance Customer service to resolve their concerned issue. A customer can also take help of Binance service number. You are now not able to access account and due to this, so call soon for Recover your Binance password and get immediate resolutions instantly.24*7 services available.Binance Exchange Number +1-833-993-0690Website:http://bit.ly/34RNqbAhttps://www.bc-cn.info/

Unable to receive digital currency from another wallet in gemini|Support phone number 1-8339-930-690 USAAre you having trouble in receiving digital currency from another wallet in gemini account? If this error bothers you to the extreme level, you can ask for help from the team via calling on gemini helpline number which is functional all the time. You can always ask for support and help from their team members and avail results that are convenient and easy to remember. Connect to them through any mode – chat, live or call and avail solutions related to queries in nick of time.Gemini customer care numberCustomer Support numberGemini helpdesk number

Is 2-factor authentication error bothering you in your Gemini account? Gemini Deposit Issue Is 2-factor authentication creating fuss in your account and you need right process to execute it properly without any trouble? To deal with all the Gemini errors, you are advised to directly reach to the team of executives who are there to support you at any point of time. Just dial Gemini Customer service Number and get immediate solutions and fix your problem on urgent basis so that you can focus on trading without any disturbances.Website: http://www.geminidesk.com/

If you want to work as a Smart Hands Engineer, we’ve got all the information you need to know before making this career change. Smart hands engineers work to offer operational support and remote management, as well as help with things like installation and troubleshooting.

GSB taxation is the top service provider for company registration, government license, and certification registration. We offer more than 50+ services and have been working for 10+ years. We are the leading service provider in: Private limited company LLP registrationOne person company Health & .Trade license FSSAI license Drug licenseImport-export code Digital Signature certificateTrademark registrationSociety registrationISI & ISO certificationAgmark registrationMSME registrationNSIC registrationAgmark certificationHallmark certificateDomain registrationStatutory & Business auditAnnal business compliancesIncome tax return filingGST registration

Thanks for the blog post. check the similar The first professional networking platform for commissionsFind - Visit profiles offering commissionsConnect - Contact with best commission providers near youCommission - Work or refer the business and get agreed commissionCommission agent

Unable to find Gemini support account.Sometimes while working on the Gemini exchange a user gets into a trouble and requiresinstant guidance. If you are going through any error in middle of something important andwant steps to eliminate any kind of error, you can always take help from the team of eliteprofessionals who are there to guide you at every step. You can always call on Gemini Customer service Number which is always functional and the team is always present to hear out yourqueries and delivers the best and accurate solutions.Website: http://www.geminidesk.com/

Unable to find Gemini support account.Sometimes while working on the Gemini exchange a user gets into a trouble and requiresinstant guidance. If you are going through any error in middle of something important andwant steps to eliminate any kind of error, you can always take help from the team of eliteprofessionals who are there to guide you at every step. You can always call on Gemini Customer service Number which is always functional and the team is always present to hear out yourqueries and delivers the best and accurate solutions.Website: http://www.geminidesk.com/

Gemini 2fa not workingGemini two-factor authentication helps in securing your account from unwanted troubles. If you don’t know how to resolve the working process of Gemini exchange, you can always call on Gemini Customer service Number which is functional all the time for guidance. You can connect with the team for availing quality and result-oriented solution from the skilled professionals in no time. You can have conversation with them related to troubles and they will provide you the best solution in order to deal with these errors in no time.Gemini Customer service NumberWebsite:http://www.geminidesk.com/

Gemini 2fa not workingGemini two-factor authentication helps in securing your account from unwanted troubles. If you don’t know how to resolve the working process of Gemini exchange, you can always call on Gemini Customer service Number which is functional all the time for guidance. You can connect with the team for availing quality and result-oriented solution from the skilled professionals in no time. You can have conversation with them related to troubles and they will provide you the best solution in order to deal with these errors in no time.Gemini Customer service NumberWebsite:http://www.geminidesk.com/

Gemini 2fa not workingGemini two-factor authentication helps in securing your account from unwanted troubles. If you don’t know how to resolve the working process of Gemini exchange, you can always call on Gemini Customer service Number which is functional all the time for guidance. You can connect with the team for availing quality and result-oriented solution from the skilled professionals in no time. You can have conversation with them related to troubles and they will provide you the best solution in order to deal with these errors in no time.Gemini Customer service NumberWebsite:http://www.geminidesk.com/

Unable to execute the recovery process of passwords for the Gemini account.Are you looking for ways to deal with password issues in the Gemini account? Do you know how to recover the password and get back access of your account. You need to have registered email ID if you want to fix it . If you are unware of the process and need guidance from the experts, you can always take assistance from the skilled professionals who are always there to listen to you. All you have to do is call on Gemini Customer service Number which is always functional and users can talk to them anytime to get solutions that are easy to use. Connect with the team for better results and answers to get rid of issues.Gemini Customer service NumberWebsite: http://www.geminidesk.com/

Unable to execute the recovery process of passwords for the Gemini account.Are you looking for ways to deal with password issues in the Gemini account? Do you know how to recover the password and get back access of your account. You need to have registered email ID if you want to fix it . If you are unware of the process and need guidance from the experts, you can always take assistance from the skilled professionals who are always there to listen to you. All you have to do is call on Gemini Customer service Number which is always functional and users can talk to them anytime to get solutions that are easy to use. Connect with the team for better results and answers to get rid of issues.Gemini Customer service NumberWebsite: http://www.geminidesk.com/

Issues due to Blockchain 2fa failed. Are you having trouble in resolving the non-working Blockchain two-factor authentication error in your Blockchain account? If you are one of those users who are unable to handle all such errors and need guidance, you can always call on ßlockchain support number which is always functional and the team is ready to guide you at every step. Whenever you are in trouble, you can always reach them for the better results and avail quality results that would be helpful in eliminating all kind of troubles from the roots. Reach them and discuss your queries with them and avail quality solutions.ßlockchain support numberWebsite: http://www.psnblockchain.com/

Issues due to Blockchain 2fa failed. Are you having trouble in resolving the non-working Blockchain two-factor authentication error in your Blockchain account? If you are one of those users who are unable to handle all such errors and need guidance, you can always call on ßlockchain support number which is always functional and the team is ready to guide you at every step. Whenever you are in trouble, you can always reach them for the better results and avail quality results that would be helpful in eliminating all kind of troubles from the roots. Reach them and discuss your queries with them and avail quality solutions.ßlockchain support numberWebsite: http://www.psnblockchain.com/

thanks for sharing this information with us. I am just surfing on internet and suddenly found this blog. Very Nice blog. Please have a look on my blog which is based on travel delta airlines phone number

Thanks for providing all the details for the trip and it will save our time in thinking ” where to visit” .This blog definitely helped me in planning my trip to this place. Thanks for sharing the great content with us .for booking cheap flights to USA visit at delta airlines reservations