官术网_书友最值得收藏!

Creating a transparent material

All the shaders we have seen so far have something in common; they are used for solid materials. If you want to improve the look of your game, transparent materials are often a good way to start. They can be used for anything from a fire effect to a glass window. Working with them, unfortunately, is slightly more complicated. Before rendering solid models, Unity orders them according to the distance from the camera (Z ordering) and skips all the triangles that are facing away from the camera (culling). When rendering transparent geometries, there are instances in which these two aspects can cause problems. This recipe will show you how to solve some of these issues when it comes to creating a transparent Surface Shader. This topic will be heavily revisited in Chapter 7, Fragment Shaders and Grab Passes, where realistic glass and water shaders will be provided.

主站蜘蛛池模板: 乳山市| 宜都市| 丰都县| 新乐市| 金秀| 吉林市| 勃利县| 长白| 察隅县| 张家界市| 平果县| 台前县| 栾川县| 浮山县| 南华县| 连州市| 林西县| 湘潭市| 英超| 彭泽县| 宜川县| 中牟县| 晋城| 封开县| 姜堰市| 彰化市| 海伦市| 安阳市| 昌平区| 葫芦岛市| 三原县| 朔州市| 高平市| 逊克县| 通江县| 玛沁县| 九江县| 溆浦县| 榕江县| 石家庄市| 长乐市|