The Shader Graph team is excited to announce the release of our newest set of samples, available to import now in 2022 LTS and the upcoming Unity 6 release. This set of samples contains more than 25 Shader Graph assets and dozens of subgraphs that are ready to be used directly in your projects. The sample shaders work in both HDRP and URP.We have two main objectives with this sample set:Give our users a jump start in shader creation by providing a set of shaders that are ready to use.Provide examples that users can build on or modify to suit their needs.This sample set will help you achieve the shader results you want more quickly without starting from scratch.We also include a step-by-step tutorial that shows how to combine the assets to create realistic environments. With the tutorial you can see how the shaders work together in context.Here’s a breakdown of the content available in the Production Ready Shaders pack:Both URP and HDRP come with code-based shaders. The most commonly used shader for each of the SRPs is called Lit. For projects that use it, it’s often applied to just about every mesh in the game. Both the HDRP and URP versions of the Lit shader are full-featured. However, sometimes users want to add additional features to achieve a specific look, or remove unused features to optimize performance. For users who aren’t familiar with shader code, this can be very difficult.For that reason, we’ve included Shader Graph versions of the Lit shader for both URP and HDRP in this sample pack. Users can make a copy of the appropriate Shader Graph Lit shader, then change any material that’s currently referencing the code version of the Lit shader to the Shader Graph version. All material settings will correctly be applied and continue to work. They’ll then be able to make changes to the Shader Graph version as needed.Decals allow you to apply local material modifications to specific locations in your scene. Think of things like applying graffiti tags to a wall or scattering fallen leaves below a tree. But decals can be used for a lot more. In these examples we see decals making things look wet, making surfaces appear to have flowing water across them, projecting water caustics, and blending specific materials onto other objects.This set of shaders is made for meshes applied to terrain – such as grass, weeds, undergrowth, pebbles, etc. To learn more, read the terrain documentation on details. Detail meshes have some specific requirements for shaders. First, because of the high number of these meshes used on the terrain, their shaders must be as fast and efficient as possible. That mainly means keeping the number of texture samples low and doing more work in the vertex shader instead of the pixel shader. Second, because these meshes stop rendering and pop out at a specific distance, we use a method to dissolve them to prevent a harsh pop, making it less obvious that they’re being removed. In each shader, you’ll see a Distance Mask used to dissolve the mesh at a distance before the mesh stops rendering.This is a full-featured, modular rock shader that can be used for everything from small pebbles, to boulders, to large cliff faces. It has features that can be turned on and off depending on the application. Each is encapsulated in a subgraph so it’s easy to remove unneeded features. You can also add new features in the chain of modules.The sample set comes with four different water shaders – lake water, animated pond water, stream water, and stream waterfall. Each one uses reflection, refraction, surface ripples using scrolling normal maps, and depth fog. They also provide additional features unique to each water type.This sample comes with a full set of weather-related subgraphs (rain and snow) that can be mixed and matched depending on the requirements of the object type. Rain effects include rain drops on top of objects, rain drips trickling down the sides, and puddles that can dynamically accumulate on flat surfaces, including rain and wind ripples.The sample set also includes a step-by-step tutorial showing how to combine the water shaders, decals, rocks, and terrain detail meshes, along with several other Unity features to create a forest stream environment. The tutorial shows how everything is put together, and how the sample pack assets can be used together to create an environment.Install the new sample assets using the Package Manager.In the Editor, open Package Manager.2. In the Package Manager window, select the Shader Graph package.3. Select the Samples tab.4. Finally, select the Production Ready Import button to bring the new Production Ready sample set into your project.
With these steps completed, the node reference assets will show up in your project under Assets/Samples/Shader Graph//Production Ready Shaders.After importing the samples, get started by opening the scene that corresponds to the render pipeline you’re using (High Definition Render Pipeline,(HDRP), or Universal Render Pipeline (URP):Assets/Samples/Shader Graph//Production Ready Shaders/Scenes/URPProductionReadyShadersAssets/Samples/Shader Graph//Production Ready Shaders/Scenes/HDRPProductionReadyShadersOnce the scene is open, select the Shader Graph Feature Samples Showcase asset at the top of the Hierarchy panel, then follow the guided tour in the Inspector.You can use the Samples dropdown box to select a sample and jump to that location in the scene.Unity continues to add more samples to Shader Graph, with several more sample packs coming in the months ahead. These will help you learn Shader Graph more quickly, understand how to set up specific functionality, and create new shaders faster with premade subgraphs and templates. We hope you’ll enjoy using them.Shader Graph basicsShader Graph documentationUnity Learn tutorialsThis is a deep and rich sample set. We hope you have fun exploring it and use it to speed up your own shader creation process.We’d love to hear your thoughts and impressions on these samples – tell us what you think in the Shader Graph forum.
원문출처 : https://unity.com/blog/engine-platform/new-shader-graph-production-ready-shaders-in-unity-6
원문출처 : https://unity.com/blog/engine-platform/new-shader-graph-production-ready-shaders-in-unity-6