In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to achieve the transition of unity cascade shadow. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
Demand
The shadowmap accuracy of the scene can barely meet the needs of scene objects, but the projection accuracy of small pendant projection of close-up characters, such as clothing thickness and collar, is insufficient. Although exclusive shadowmap is possible, I tried to use the last level of cascading shadows as character shadows in order not to add overhead. This operation is very simple and not worth writing this article, but to do so needs to solve the problem of two-level join seams. First, there are 2 effect pictures (in fact, the second picture was implemented by me independently by shadowmap, so I brought him with me to make the background picture)
Pay attention to the shadows of the arms and waist clothes
Shadow of gun parts
Fuzzy seam problem
Different cascade mapping accuracy is different, so it is normal to have blurred to clear seams. Unity shader has achieved transition but notes that spherical cascades are miscalculated. It is not recommended to turn on (unity has non-spherical cascades? ). And I thought of a high-performance transition method that didn't need to sample two cascaded shadwomap, so I implemented it myself.
What I want to do is to make a transition sharpening of remote cascade shadows, sharpening without much sampling. The simple principle is to make black darker and whiter, so I opened the curve tool and put together a function. This is the green one. Yellow is his inverse function that I pushed by the way.
Add this function to the Internal-ScreenSpaceShadows.shader file and make a transition call, and then it will have an effect. The lack of gif precision should be seen very carefully. The actual game runs obviously, so it needs to be solved.
Luminance seam problem
The old shadowmap problem has been solved with the old recipes of bias and normalBias for many years, but there is a problem after the cascading shadow. He does not support separate settings for different cascades. In this way, there will be a nearby bias just right, but the next level is too small to lead to Shadow acne. So it is darker because the brightness is different, then there will be seams naturally, and it is easy to know that the principle is easy to modify. Just let different distances set different bias. I am lazy here and add an offset directly, adding different amounts according to the cascade distance. The official production proposal is to send a copy of the other three cascading bias, which can be modified in the vertShadowCaster function. Note that the current camera is not the main camera of the scene, so you need to transmit the position of the main camera to determine the distance. And the bias and shader of the inspector panel are not a numeric value and the symbol is opposite.
Solved the above two transition problems cascading shadows can be the last 5 meters alone a shadowmap precision enough to meet the general character needs. For shadows with higher demand, such as slightly raised parts, it is recommended to use contact shadows or Ring of Elysium to highlight the protruding parts of the character equipment directly, so as not to break too many shadows because of the precision. You can also try to use the renderer baffle in shadowOnly mode to block one to avoid disconnection.
After reading the above, do you have any further understanding of how to achieve the transition of unity cascade shadows? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.