Search Unity

Rome: Truly AAA Quality Exterior Enviroment Pack for Unity

Discussion in 'Assets and Asset Store' started by QuantumTheory, Mar 1, 2016.

  1. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    You could state that older versions of the asset below 2019.3 don't support HDRP. You can have multiple versions of the same asset on the store, and the version of Unity decides which one to download.

    Sorry, I do understand how difficult Unity is making it for asset store devs at the moment.
     
  2. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    Yes, that was the case until I got a deluge of requests to support HDRP over those different versions.
     
  3. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    That means that you've cut those people out anyway and everyone else who uses a version of unity lower that 2019.3.
    There are plenty of people using older versions of unity for production particularly the Long Term Support versions, and HDRP isn't even production ready yet.
     
  4. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    242
    You can download Unity 2019.3 and download the package and use it in the version you want
     
  5. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    Won't that break all the prefabs and possibly the demo scene?
     
  6. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    Precisely why it's a mistake for unity to do what they're doing. It forces publishers to upset a potential customer, whether they're on LTS or the latest. If I say HDRP isn't supported, someone would be posting here just as upset. People use all kinds of versions of Unity. This is partly why I'm no longer making new packages, just maintaining what is there.
     
  7. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    The people that wanted HDRP support in an earlier version still don't get it, you just don't support any renderer now in an earlier version of Unity not even LTS. It's perfectly reasonable to put restrictions on what version of the HDRP you support because it's still being developed and changing all the time, but why let that determine support for the stable built-in renderer.

    It's frustrating for me because after a couple of years I'm finally in a position to buy this asset and the version I need exists but has been removed from the store. This asset is of such a rare high quality and will be hard to replace.
     
  8. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    Let me see what I can do on my end. I have some backup copies of the packages to check. Give me a day or two.

    I definitely feel your frustration. I've felt frustrated many times over the years of publishing here. I'm sorry for the inconvenience but I'll see what I can do.
     
    TeagansDad, hopeful and camta005 like this.
  9. shredingskin

    shredingskin

    Joined:
    Nov 7, 2012
    Posts:
    242
    I don't think so, just download the package and then go to the app/roaming folder and import the package straight up.
    Try it in tests projects just in case
     
  10. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    I bought Rome Pack 1 and tried it in Unity 2018.4 LTS (built-in renderer). The demo scene is partially broken but I'm able to use everything in a new scene without any problems.
     
  11. newmolleby

    newmolleby

    Joined:
    Nov 10, 2019
    Posts:
    1
    First of all, sublime work! I'm going to use pack I and II for an Ancient Greece project that I'm planning. There is plenty of overlap between private classical Greek and Roman architecture. However, when it comes to the more monumental architecture, these packs are narrowly Roman. Which isn't a criticism... I'd just like to know; any chance that we could get a modular building set for earlier temple architecture too (Doric Ionic and Corinthian)? Their subcomponents would fit perfectly with a modular build pack and QuantumTheory would execute it perfectly, I'm certain of it.
     
  12. Hines94

    Hines94

    Joined:
    Feb 15, 2020
    Posts:
    19
    Hi all,
    Has anyone managed to successfully convert the materials using the unity 2019 LTS and Universal Render Pipeline? If not do you guys think this would be relatively easy or difficult?
    Thanks
     
  13. HumStuff

    HumStuff

    Joined:
    Nov 27, 2018
    Posts:
    11

    Hey there,

    I bought your amazing pack (II), imported it into a regular 3D scene and then installed the HDRP package (version 10.2.2).
    I used your script as you recommended above, and got some warnings and hundreds of errors o_O (saved them all).
    Sample of the errors that I get:
    Shader error in 'Quantum Theory/HDRP/Simple Water': Couldn't open include file 'Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl'. at line 208
    Shader error in 'Quantum Theory/URP/PBR - Rome Multicolored Fresco Decal Layer 2': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl'. at line 183

    Most of the errors see to be of the same category, "couldn't open include file..."
    Obviously, the materials did not convert properly and some of the prefabs are still pink.

    What am I missing?
    I would really appreciate your help.
    I've attached the relevant console warning & error messages.

    I'm using Unity version 2020.
    Thank you!
     

    Attached Files:

    Last edited: Jan 9, 2021
  14. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    @Hamstuff

    This is symptomatic of Unity's SRP system. I'm afraid everyone (all publishers) is victim to what is happening as their shaders literally break every version now. No matter what I do, a new version of Unity will break the previous version's shaders.

    HDRP is still in preview, and Unity has recommended people stay on the LTS versions of Unity. Hopefully at some point this whole thing is sorted out, but until such time, I can only support 2019 LTS's shaders which is what the Rome packs support.

    I' *really* sorry about this but it's just not feasible for me to learn the changes made to each Unity version, update shaders, and upload Asset Store update packs for every single version. If you feel up to it, you can update the shaders yourself as they are authored using Amplify Shader Editor.

    If people sent all their bug reports to Unity, things might change. I am updating my UAS pages to reflect this position.
     
    hopeful likes this.
  15. HumStuff

    HumStuff

    Joined:
    Nov 27, 2018
    Posts:
    11
    First and foremost - thank you for the swift reply!

    Since I have no experience in shaders updating (...) and I'm a beginner in HDRP, considering your honest (and much appreciated answer) I'm wondering about a couple of things:
    - If I stay with 2020 and manually replace all the shaders to your provided HDRP ones, will I be able to finish the scene (bake, post-process etc.)? or will I run into unexpected problems?
    - If the answer to the above question is yes and the scene will not be playable, should switching to 2019 LTS solve all or most of the problems? (still, I don't know what kind of problems....)

    BR
     
  16. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    It sounds like my HDRP shaders are not compatible with 2020, so simlpy using my shaders won't get you anywhere. If you edited the shaders and recompiled them based on what is required by unity 2020, of course they would work.

    If you switch to 2019 LTS and import my package, you won't have the pink shader issue.
     
  17. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    My two cents ... these days, unless you have a specific reason not to, always develop your game using the latest LTS version. Basically, that's why LTS is there. It's to provide a stable platform for development and publishing of your game.
     
  18. HumStuff

    HumStuff

    Joined:
    Nov 27, 2018
    Posts:
    11
    Hey guys!

    So a day passed with lots of tests in different configurations. Both 2020.1.15 and the 2019LTS.
    In 2019 the errors are different, same warning though.

    Let me explain what I did and show you using screenshots.

    First I opened a clean 3D project (2019 LTS), installed the HDRP package and then imported the Rome Pack II.

    I got those bugs RomeErrors1.png

    and before that some warnings
    RomeWarnings.png

    Then I opened the Material window (for the whole project) and it looked fine, until I chose/pressed on some of them and some of them went black (!). Like in this picture:
    MaterialsFolder.png

    And while pressing the "blacked" material, I got this error messages (lots of them, stacking up as I choose only SOME of the materials):
    RomeErrors1.png

    why...?

    The inspector looks like that:
    MaterialNotCorrect.png

    Only after I manually choose again the SAME Shader from the Qunatum folder, the material reverts back to looking ok (hopefully).

    What's going on?

    Help is much appreciated....I really would like to use this package. it's not less than amazing.

    Thank you
     
  19. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    Thanks for all the thorough information. I will look into this today.

    Regarding the warnings about SBSAR files, that's due to the Substance Plugin not being installed. You can safely ignore those warnings, or delete the sbsar files from the project if it bothers you. Either option won't negatively affect you.

    It appears Unity is having trouble just making the little material preview icon.
     
    Last edited: Jan 11, 2021
  20. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    For those having shader issues with 2019 LTS and HDRP in Rome 1 and 2, here is the fix

     
  21. HumStuff

    HumStuff

    Joined:
    Nov 27, 2018
    Posts:
    11

    So basically if that's the whole problem, we're all good here :)

    One more quick question about the prefab thumbnails.
    At first they are all pink, but do you have any idea why after re-importing them, some are ok. some are white and some are in-between... let me show you:

    RomeThumbs1.png

    All white:
    RomeThumbs2.png

    In-between:
    RomeThumbs3.png

    Thank you so much!
     
  22. davidrivera

    davidrivera

    Joined:
    Apr 8, 2009
    Posts:
    19
    I love your "Rome: Fantasy Pack I". It looks looks stunning and it works smoothly on my Oculus Quest 2. Will there be a mobile version of "Rome: Fantasy Pack II". If not will "Rome: Fantasy Pack II" be able to work smoothly on mobile chipset. The Oculus Quest 2 uses the Qualcomm Snapdragon XR2 which is equivalent in power to the Snapdragon 865.
     
  23. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    I'm glad Rome Pack 1 runs great on Quest 2. Frankly I'm surprised. There is a mobile version of Pack 1 in the store too which yields greater performance but of course there are quality trade-offs.

    Pack 2 is created for desktop machines, so try at your own risk!
     
  24. HumStuff

    HumStuff

    Joined:
    Nov 27, 2018
    Posts:
    11
    Hi, I'm using RFP1&2, for a second project now.
    The first one was in HDRP and now in URP.
    I must say it's an amazing pack. I really like it.

    I ran into a very tiny bug, thought you might want to know... :)
    Seriously, far from urgent.

    For both of the packs, when I choose Convert to SRP from the menu and the process finished, it shows the following dialog with the instructions, even though it's for the URP process.

    Images attached.

    Take care, cheers

    RFP1.png RFP2.png RFP4.png RFP3.png
     
  25. kirkokuev

    kirkokuev

    Joined:
    Aug 9, 2014
    Posts:
    15
    Hello, I have this terrible flickering effect while using the asset. The effect looks like z-fighting but it only happens with decals. Here are some examples of it, I use Unity 2019.3.0f6 and standard rendering





    What can I do to get rid of these artefacts?
     
  26. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Hello there i've bought your rome mobile fantasy pack to learn how to optimize unity scenes for mobile devices.
    But i have some issues. Where did you bake your lightmap? Why it takes only 1 texture in your bake? Why my bake takes 3 textures? I bake in the same settings
     
  27. Shinekaze

    Shinekaze

    Joined:
    Apr 3, 2022
    Posts:
    4
    Hi, I'm using the Rome Asset Packs 1 and 2 in Unity 2020.3, URP 10.8.1 for a school project. We're rebuilding some real world ruins in VR and AR. Because we're using AR Foundation/ AR Core, we have to use URP, as apparently no other rendering pipeline is supported.

    I'm running into an issue where the URP/PBR - Rome Multicolored Fresco Decal Layer and Layer 2 shaders are displaying with a semi-transparent box around the object.

    Is there a fix that I can implement to make these decals render as they do in SRP?
    upload_2022-9-6_16-7-19.png
    upload_2022-9-6_16-8-31.png
     
  28. Pete_Matterfield

    Pete_Matterfield

    Joined:
    May 26, 2021
    Posts:
    1
    Hmm looks like alpha isn't being used in the shader. How did you convert the shader to URP? I would say it needs to have alpha clip (or test) enabled.
     
  29. Shinekaze

    Shinekaze

    Joined:
    Apr 3, 2022
    Posts:
    4
    I used the Roman Asset Pack's built in conversion tool from SRP to URP, but I think that it's been broken by a Unity release at some point. I can see that there's a Blend option on the Forward subshader set to Blend One Zero, One Zero. I'm currently trying various combinations of options from Unity - Manual: ShaderLab command: Blend (unity3d.com) to see if that will help. So far I've managed to make it very dim, completely black, or disappear completely, but no luck on getting just the outer edges to be transparent.

    Here's the shader code if that's helpful

    Code (CSharp):
    1. // Made with Amplify Shader Editor
    2. // Available at the Unity Asset Store - http://u3d.as/y3X
    3. Shader "Quantum Theory/URP/PBR - Rome Multicolored Fresco Decal Layer 2"
    4. {
    5.     Properties
    6.     {
    7.         [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
    8.         [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
    9.         _BaseColor("Base Color", 2D) = "white" {}
    10.         _NormalMap("Normal Map", 2D) = "bump" {}
    11.         _Material("Material", 2D) = "black" {}
    12.         _ColorA("Color A", Color) = (1,0,0,0)
    13.         _ColorB("Color B", Color) = (0,1,0,0)
    14.         _ColorC("Color C", Color) = (0,0,1,0)
    15.         _PaintGlossiness("Paint Glossiness", Range( 0 , 1)) = 0
    16.         [HideInInspector] _texcoord( "", 2D ) = "white" {}
    17.  
    18.         //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5
    19.         //_TransStrength( "Trans Strength", Range( 0, 50 ) ) = 1
    20.         //_TransNormal( "Trans Normal Distortion", Range( 0, 1 ) ) = 0.5
    21.         //_TransScattering( "Trans Scattering", Range( 1, 50 ) ) = 2
    22.         //_TransDirect( "Trans Direct", Range( 0, 1 ) ) = 0.9
    23.         //_TransAmbient( "Trans Ambient", Range( 0, 1 ) ) = 0.1
    24.         //_TransShadow( "Trans Shadow", Range( 0, 1 ) ) = 0.5
    25.         //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
    26.         //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
    27.         //_TessMin( "Tess Min Distance", Float ) = 10
    28.         //_TessMax( "Tess Max Distance", Float ) = 25
    29.         //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
    30.         //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
    31.     }
    32.  
    33.     SubShader
    34.     {
    35.         LOD 0
    36.  
    37.      
    38.  
    39.         Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "Queue"="Geometry" }
    40.         Cull Back
    41.         AlphaToMask Off
    42.         HLSLINCLUDE
    43.         #pragma target 2.0
    44.  
    45.         float4 FixedTess( float tessValue )
    46.         {
    47.             return tessValue;
    48.         }
    49.      
    50.         float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
    51.         {
    52.             float3 wpos = mul(o2w,vertex).xyz;
    53.             float dist = distance (wpos, cameraPos);
    54.             float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
    55.             return f;
    56.         }
    57.  
    58.         float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
    59.         {
    60.             float4 tess;
    61.             tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
    62.             tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
    63.             tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
    64.             tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
    65.             return tess;
    66.         }
    67.  
    68.         float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
    69.         {
    70.             float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
    71.             float len = distance(wpos0, wpos1);
    72.             float f = max(len * scParams.y / (edgeLen * dist), 1.0);
    73.             return f;
    74.         }
    75.  
    76.         float DistanceFromPlane (float3 pos, float4 plane)
    77.         {
    78.             float d = dot (float4(pos,1.0f), plane);
    79.             return d;
    80.         }
    81.  
    82.         bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
    83.         {
    84.             float4 planeTest;
    85.             planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
    86.                           (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
    87.                           (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
    88.             planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
    89.                           (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
    90.                           (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
    91.             planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
    92.                           (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
    93.                           (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
    94.             planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
    95.                           (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
    96.                           (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
    97.             return !all (planeTest);
    98.         }
    99.  
    100.         float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
    101.         {
    102.             float3 f;
    103.             f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
    104.             f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
    105.             f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
    106.  
    107.             return CalcTriEdgeTessFactors (f);
    108.         }
    109.  
    110.         float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
    111.         {
    112.             float3 pos0 = mul(o2w,v0).xyz;
    113.             float3 pos1 = mul(o2w,v1).xyz;
    114.             float3 pos2 = mul(o2w,v2).xyz;
    115.             float4 tess;
    116.             tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
    117.             tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
    118.             tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
    119.             tess.w = (tess.x + tess.y + tess.z) / 3.0f;
    120.             return tess;
    121.         }
    122.  
    123.         float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
    124.         {
    125.             float3 pos0 = mul(o2w,v0).xyz;
    126.             float3 pos1 = mul(o2w,v1).xyz;
    127.             float3 pos2 = mul(o2w,v2).xyz;
    128.             float4 tess;
    129.  
    130.             if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
    131.             {
    132.                 tess = 0.0f;
    133.             }
    134.             else
    135.             {
    136.                 tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
    137.                 tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
    138.                 tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
    139.                 tess.w = (tess.x + tess.y + tess.z) / 3.0f;
    140.             }
    141.             return tess;
    142.         }
    143.         ENDHLSL
    144.  
    145.      
    146.         Pass
    147.         {
    148.          
    149.             Name "Forward"
    150.             Tags { "LightMode"="UniversalForward" }
    151.          
    152.             Blend One Zero, One Zero
    153.             ZWrite On
    154.             ZTest LEqual
    155.             Offset -2 , -3
    156.             ColorMask RGBA
    157.          
    158.  
    159.             HLSLPROGRAM
    160.             #define _NORMAL_DROPOFF_TS 1
    161.             #pragma multi_compile_instancing
    162.             #pragma multi_compile _ LOD_FADE_CROSSFADE
    163.             #pragma multi_compile_fog
    164.             #define ASE_FOG 1
    165.             #define _NORMALMAP 1
    166.             #define ASE_SRP_VERSION 70108
    167.  
    168.             #pragma prefer_hlslcc gles
    169.             #pragma exclude_renderers d3d11_9x
    170.  
    171.             #pragma multi_compile _ _MAIN_LIGHT_SHADOWS
    172.             #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
    173.             #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
    174.             #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
    175.             #pragma multi_compile _ _SHADOWS_SOFT
    176.             #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
    177.          
    178.             #pragma multi_compile _ DIRLIGHTMAP_COMBINED
    179.             #pragma multi_compile _ LIGHTMAP_ON
    180.  
    181.             #pragma vertex vert
    182.             #pragma fragment frag
    183.  
    184.             #define SHADERPASS_FORWARD
    185.  
    186.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    187.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    188.             #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    189.             #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
    190.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    191.          
    192.             #if ASE_SRP_VERSION <= 70108
    193.             #define REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR
    194.             #endif
    195.  
    196.          
    197.  
    198.             struct VertexInput
    199.             {
    200.                 float4 vertex : POSITION;
    201.                 float3 ase_normal : NORMAL;
    202.                 float4 ase_tangent : TANGENT;
    203.                 float4 texcoord1 : TEXCOORD1;
    204.                 float4 ase_texcoord : TEXCOORD0;
    205.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    206.             };
    207.  
    208.             struct VertexOutput
    209.             {
    210.                 float4 clipPos : SV_POSITION;
    211.                 float4 lightmapUVOrVertexSH : TEXCOORD0;
    212.                 half4 fogFactorAndVertexLight : TEXCOORD1;
    213.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
    214.                 float4 shadowCoord : TEXCOORD2;
    215.                 #endif
    216.                 float4 tSpace0 : TEXCOORD3;
    217.                 float4 tSpace1 : TEXCOORD4;
    218.                 float4 tSpace2 : TEXCOORD5;
    219.                 #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
    220.                 float4 screenPos : TEXCOORD6;
    221.                 #endif
    222.                 float4 ase_texcoord7 : TEXCOORD7;
    223.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    224.                 UNITY_VERTEX_OUTPUT_STEREO
    225.             };
    226.  
    227.             CBUFFER_START(UnityPerMaterial)
    228.             float4 _ColorA;
    229.             float4 _BaseColor_ST;
    230.             float4 _ColorB;
    231.             float4 _ColorC;
    232.             float4 _NormalMap_ST;
    233.             float4 _Material_ST;
    234.             float _PaintGlossiness;
    235.             #ifdef _TRANSMISSION_ASE
    236.                 float _TransmissionShadow;
    237.             #endif
    238.             #ifdef _TRANSLUCENCY_ASE
    239.                 float _TransStrength;
    240.                 float _TransNormal;
    241.                 float _TransScattering;
    242.                 float _TransDirect;
    243.                 float _TransAmbient;
    244.                 float _TransShadow;
    245.             #endif
    246.             #ifdef TESSELLATION_ON
    247.                 float _TessPhongStrength;
    248.                 float _TessValue;
    249.                 float _TessMin;
    250.                 float _TessMax;
    251.                 float _TessEdgeLength;
    252.                 float _TessMaxDisp;
    253.             #endif
    254.             CBUFFER_END
    255.             sampler2D _BaseColor;
    256.             SAMPLER(sampler_BaseColor);
    257.             sampler2D _NormalMap;
    258.             sampler2D _Material;
    259.             SAMPLER(sampler_Material);
    260.  
    261.  
    262.          
    263.             VertexOutput VertexFunction( VertexInput v  )
    264.             {
    265.                 VertexOutput o = (VertexOutput)0;
    266.                 UNITY_SETUP_INSTANCE_ID(v);
    267.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    268.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
    269.  
    270.                 o.ase_texcoord7.xy = v.ase_texcoord.xy;
    271.              
    272.                 //setting value to unused interpolator channels and avoid initialization warnings
    273.                 o.ase_texcoord7.zw = 0;
    274.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    275.                     float3 defaultVertexValue = v.vertex.xyz;
    276.                 #else
    277.                     float3 defaultVertexValue = float3(0, 0, 0);
    278.                 #endif
    279.                 float3 vertexValue = defaultVertexValue;
    280.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    281.                     v.vertex.xyz = vertexValue;
    282.                 #else
    283.                     v.vertex.xyz += vertexValue;
    284.                 #endif
    285.                 v.ase_normal = v.ase_normal;
    286.  
    287.                 float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
    288.                 float3 positionVS = TransformWorldToView( positionWS );
    289.                 float4 positionCS = TransformWorldToHClip( positionWS );
    290.  
    291.                 VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent );
    292.  
    293.                 o.tSpace0 = float4( normalInput.normalWS, positionWS.x);
    294.                 o.tSpace1 = float4( normalInput.tangentWS, positionWS.y);
    295.                 o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z);
    296.  
    297.                 OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy );
    298.                 OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz );
    299.  
    300.                 half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS );
    301.                 #ifdef ASE_FOG
    302.                     half fogFactor = ComputeFogFactor( positionCS.z );
    303.                 #else
    304.                     half fogFactor = 0;
    305.                 #endif
    306.                 o.fogFactorAndVertexLight = half4(fogFactor, vertexLight);
    307.              
    308.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
    309.                 VertexPositionInputs vertexInput = (VertexPositionInputs)0;
    310.                 vertexInput.positionWS = positionWS;
    311.                 vertexInput.positionCS = positionCS;
    312.                 o.shadowCoord = GetShadowCoord( vertexInput );
    313.                 #endif
    314.              
    315.                 o.clipPos = positionCS;
    316.                 #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
    317.                 o.screenPos = ComputeScreenPos(positionCS);
    318.                 #endif
    319.                 return o;
    320.             }
    321.          
    322.             #if defined(TESSELLATION_ON)
    323.             struct VertexControl
    324.             {
    325.                 float4 vertex : INTERNALTESSPOS;
    326.                 float3 ase_normal : NORMAL;
    327.                 float4 ase_tangent : TANGENT;
    328.                 float4 texcoord1 : TEXCOORD1;
    329.                 float4 ase_texcoord : TEXCOORD0;
    330.  
    331.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    332.             };
    333.  
    334.             struct TessellationFactors
    335.             {
    336.                 float edge[3] : SV_TessFactor;
    337.                 float inside : SV_InsideTessFactor;
    338.             };
    339.  
    340.             VertexControl vert ( VertexInput v )
    341.             {
    342.                 VertexControl o;
    343.                 UNITY_SETUP_INSTANCE_ID(v);
    344.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    345.                 o.vertex = v.vertex;
    346.                 o.ase_normal = v.ase_normal;
    347.                 o.ase_tangent = v.ase_tangent;
    348.                 o.texcoord1 = v.texcoord1;
    349.                 o.ase_texcoord = v.ase_texcoord;
    350.                 return o;
    351.             }
    352.  
    353.             TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
    354.             {
    355.                 TessellationFactors o;
    356.                 float4 tf = 1;
    357.                 float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
    358.                 float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
    359.                 #if defined(ASE_FIXED_TESSELLATION)
    360.                 tf = FixedTess( tessValue );
    361.                 #elif defined(ASE_DISTANCE_TESSELLATION)
    362.                 tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
    363.                 #elif defined(ASE_LENGTH_TESSELLATION)
    364.                 tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
    365.                 #elif defined(ASE_LENGTH_CULL_TESSELLATION)
    366.                 tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
    367.                 #endif
    368.                 o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
    369.                 return o;
    370.             }
    371.  
    372.             [domain("tri")]
    373.             [partitioning("fractional_odd")]
    374.             [outputtopology("triangle_cw")]
    375.             [patchconstantfunc("TessellationFunction")]
    376.             [outputcontrolpoints(3)]
    377.             VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
    378.             {
    379.                return patch[id];
    380.             }
    381.  
    382.             [domain("tri")]
    383.             VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
    384.             {
    385.                 VertexInput o = (VertexInput) 0;
    386.                 o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
    387.                 o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
    388.                 o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
    389.                 o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
    390.                 o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
    391.                 #if defined(ASE_PHONG_TESSELLATION)
    392.                 float3 pp[3];
    393.                 for (int i = 0; i < 3; ++i)
    394.                     pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
    395.                 float phongStrength = _TessPhongStrength;
    396.                 o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
    397.                 #endif
    398.                 UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
    399.                 return VertexFunction(o);
    400.             }
    401.             #else
    402.             VertexOutput vert ( VertexInput v )
    403.             {
    404.                 return VertexFunction( v );
    405.             }
    406.             #endif
    407.  
    408.             half4 frag ( VertexOutput IN  ) : SV_Target
    409.             {
    410.                 UNITY_SETUP_INSTANCE_ID(IN);
    411.                 UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
    412.  
    413.                 #ifdef LOD_FADE_CROSSFADE
    414.                     LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
    415.                 #endif
    416.  
    417.                 float3 WorldNormal = normalize( IN.tSpace0.xyz );
    418.                 float3 WorldTangent = IN.tSpace1.xyz;
    419.                 float3 WorldBiTangent = IN.tSpace2.xyz;
    420.                 float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w);
    421.                 float3 WorldViewDirection = _WorldSpaceCameraPos.xyz  - WorldPosition;
    422.                 float4 ShadowCoords = float4( 0, 0, 0, 0 );
    423.                 #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
    424.                 float4 ScreenPos = IN.screenPos;
    425.                 #endif
    426.  
    427.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
    428.                     ShadowCoords = IN.shadowCoord;
    429.                 #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
    430.                     ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
    431.                 #endif
    432.  
    433.                 WorldViewDirection = SafeNormalize( WorldViewDirection );
    434.  
    435.                 float2 uv_BaseColor = IN.ase_texcoord7.xy * _BaseColor_ST.xy + _BaseColor_ST.zw;
    436.                 float4 tex2DNode3 = tex2D( _BaseColor, uv_BaseColor );
    437.              
    438.                 float2 uv_NormalMap = IN.ase_texcoord7.xy * _NormalMap_ST.xy + _NormalMap_ST.zw;
    439.              
    440.                 float2 uv_Material = IN.ase_texcoord7.xy * _Material_ST.xy + _Material_ST.zw;
    441.                 float4 tex2DNode38 = tex2D( _Material, uv_Material );
    442.              
    443.                 float3 Albedo = ( ( ( _ColorA * tex2DNode3.r ) + ( _ColorB * tex2DNode3.g ) ) + ( _ColorC * tex2DNode3.b ) ).rgb;
    444.                 float3 Normal = UnpackNormalScale( tex2D( _NormalMap, uv_NormalMap ), 1.0f );
    445.                 float3 Emission = 0;
    446.                 float3 Specular = 0.5;
    447.                 float Metallic = tex2DNode38.r;
    448.                 float Smoothness = _PaintGlossiness;
    449.                 float Occlusion = tex2DNode38.g;
    450.                 float Alpha = 1;
    451.                 float AlphaClipThreshold = 0.5;
    452.                 float AlphaClipThresholdShadow = 0.5;
    453.                 float3 BakedGI = 0;
    454.                 float3 RefractionColor = 1;
    455.                 float RefractionIndex = 1;
    456.                 float3 Transmission = 1;
    457.                 float3 Translucency = 1;
    458.  
    459.                 #ifdef _ALPHATEST_ON
    460.                     clip(Alpha - AlphaClipThreshold);
    461.                 #endif
    462.  
    463.                 InputData inputData;
    464.                 inputData.positionWS = WorldPosition;
    465.                 inputData.viewDirectionWS = WorldViewDirection;
    466.                 inputData.shadowCoord = ShadowCoords;
    467.  
    468.                 #ifdef _NORMALMAP
    469.                     #if _NORMAL_DROPOFF_TS
    470.                     inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal ));
    471.                     #elif _NORMAL_DROPOFF_OS
    472.                     inputData.normalWS = TransformObjectToWorldNormal(Normal);
    473.                     #elif _NORMAL_DROPOFF_WS
    474.                     inputData.normalWS = Normal;
    475.                     #endif
    476.                     inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);
    477.                 #else
    478.                     inputData.normalWS = WorldNormal;
    479.                 #endif
    480.  
    481.                 #ifdef ASE_FOG
    482.                     inputData.fogCoord = IN.fogFactorAndVertexLight.x;
    483.                 #endif
    484.  
    485.                 inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw;
    486.                 inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, IN.lightmapUVOrVertexSH.xyz, inputData.normalWS );
    487.                 #ifdef _ASE_BAKEDGI
    488.                     inputData.bakedGI = BakedGI;
    489.                 #endif
    490.                 half4 color = UniversalFragmentPBR(
    491.                     inputData,
    492.                     Albedo,
    493.                     Metallic,
    494.                     Specular,
    495.                     Smoothness,
    496.                     Occlusion,
    497.                     Emission,
    498.                     Alpha);
    499.  
    500.                 #ifdef _TRANSMISSION_ASE
    501.                 {
    502.                     float shadow = _TransmissionShadow;
    503.  
    504.                     Light mainLight = GetMainLight( inputData.shadowCoord );
    505.                     float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
    506.                     mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
    507.                     half3 mainTransmission = max(0 , -dot(inputData.normalWS, mainLight.direction)) * mainAtten * Transmission;
    508.                     color.rgb += Albedo * mainTransmission;
    509.  
    510.                     #ifdef _ADDITIONAL_LIGHTS
    511.                         int transPixelLightCount = GetAdditionalLightsCount();
    512.                         for (int i = 0; i < transPixelLightCount; ++i)
    513.                         {
    514.                             Light light = GetAdditionalLight(i, inputData.positionWS);
    515.                             float3 atten = light.color * light.distanceAttenuation;
    516.                             atten = lerp( atten, atten * light.shadowAttenuation, shadow );
    517.  
    518.                             half3 transmission = max(0 , -dot(inputData.normalWS, light.direction)) * atten * Transmission;
    519.                             color.rgb += Albedo * transmission;
    520.                         }
    521.                     #endif
    522.                 }
    523.                 #endif
    524.  
    525.                 #ifdef _TRANSLUCENCY_ASE
    526.                 {
    527.                     float shadow = _TransShadow;
    528.                     float normal = _TransNormal;
    529.                     float scattering = _TransScattering;
    530.                     float direct = _TransDirect;
    531.                     float ambient = _TransAmbient;
    532.                     float strength = _TransStrength;
    533.  
    534.                     Light mainLight = GetMainLight( inputData.shadowCoord );
    535.                     float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
    536.                     mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
    537.  
    538.                     half3 mainLightDir = mainLight.direction + inputData.normalWS * normal;
    539.                     half mainVdotL = pow( saturate( dot( inputData.viewDirectionWS, -mainLightDir ) ), scattering );
    540.                     half3 mainTranslucency = mainAtten * ( mainVdotL * direct + inputData.bakedGI * ambient ) * Translucency;
    541.                     color.rgb += Albedo * mainTranslucency * strength;
    542.  
    543.                     #ifdef _ADDITIONAL_LIGHTS
    544.                         int transPixelLightCount = GetAdditionalLightsCount();
    545.                         for (int i = 0; i < transPixelLightCount; ++i)
    546.                         {
    547.                             Light light = GetAdditionalLight(i, inputData.positionWS);
    548.                             float3 atten = light.color * light.distanceAttenuation;
    549.                             atten = lerp( atten, atten * light.shadowAttenuation, shadow );
    550.  
    551.                             half3 lightDir = light.direction + inputData.normalWS * normal;
    552.                             half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering );
    553.                             half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency;
    554.                             color.rgb += Albedo * translucency * strength;
    555.                         }
    556.                     #endif
    557.                 }
    558.                 #endif
    559.  
    560.                 #ifdef _REFRACTION_ASE
    561.                     float4 projScreenPos = ScreenPos / ScreenPos.w;
    562.                     float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, WorldNormal ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) );
    563.                     projScreenPos.xy += refractionOffset.xy;
    564.                     float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos ) * RefractionColor;
    565.                     color.rgb = lerp( refraction, color.rgb, color.a );
    566.                     color.a = 1;
    567.                 #endif
    568.  
    569.                 #ifdef ASE_FOG
    570.                     #ifdef TERRAIN_SPLAT_ADDPASS
    571.                         color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x );
    572.                     #else
    573.                         color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x);
    574.                     #endif
    575.                 #endif
    576.              
    577.                 return color;
    578.             }
    579.  
    580.             ENDHLSL
    581.         }
    582.  
    583.      
    584.         Pass
    585.         {
    586.          
    587.             Name "ShadowCaster"
    588.             Tags { "LightMode"="ShadowCaster" }
    589.  
    590.             ZWrite On
    591.             ZTest LEqual
    592.             AlphaToMask Off
    593.  
    594.             HLSLPROGRAM
    595.             #define _NORMAL_DROPOFF_TS 1
    596.             #pragma multi_compile_instancing
    597.             #pragma multi_compile _ LOD_FADE_CROSSFADE
    598.             #pragma multi_compile_fog
    599.             #define ASE_FOG 1
    600.             #define _NORMALMAP 1
    601.             #define ASE_SRP_VERSION 70108
    602.  
    603.             #pragma prefer_hlslcc gles
    604.             #pragma exclude_renderers d3d11_9x
    605.  
    606.             #pragma vertex vert
    607.             #pragma fragment frag
    608.  
    609.             #define SHADERPASS_SHADOWCASTER
    610.  
    611.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    612.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    613.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    614.             #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    615.  
    616.          
    617.  
    618.             struct VertexInput
    619.             {
    620.                 float4 vertex : POSITION;
    621.                 float3 ase_normal : NORMAL;
    622.              
    623.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    624.             };
    625.  
    626.             struct VertexOutput
    627.             {
    628.                 float4 clipPos : SV_POSITION;
    629.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    630.                 float3 worldPos : TEXCOORD0;
    631.                 #endif
    632.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    633.                 float4 shadowCoord : TEXCOORD1;
    634.                 #endif
    635.              
    636.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    637.                 UNITY_VERTEX_OUTPUT_STEREO
    638.             };
    639.  
    640.             CBUFFER_START(UnityPerMaterial)
    641.             float4 _ColorA;
    642.             float4 _BaseColor_ST;
    643.             float4 _ColorB;
    644.             float4 _ColorC;
    645.             float4 _NormalMap_ST;
    646.             float4 _Material_ST;
    647.             float _PaintGlossiness;
    648.             #ifdef _TRANSMISSION_ASE
    649.                 float _TransmissionShadow;
    650.             #endif
    651.             #ifdef _TRANSLUCENCY_ASE
    652.                 float _TransStrength;
    653.                 float _TransNormal;
    654.                 float _TransScattering;
    655.                 float _TransDirect;
    656.                 float _TransAmbient;
    657.                 float _TransShadow;
    658.             #endif
    659.             #ifdef TESSELLATION_ON
    660.                 float _TessPhongStrength;
    661.                 float _TessValue;
    662.                 float _TessMin;
    663.                 float _TessMax;
    664.                 float _TessEdgeLength;
    665.                 float _TessMaxDisp;
    666.             #endif
    667.             CBUFFER_END
    668.          
    669.  
    670.          
    671.             float3 _LightDirection;
    672.  
    673.             VertexOutput VertexFunction( VertexInput v )
    674.             {
    675.                 VertexOutput o;
    676.                 UNITY_SETUP_INSTANCE_ID(v);
    677.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    678.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
    679.  
    680.              
    681.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    682.                     float3 defaultVertexValue = v.vertex.xyz;
    683.                 #else
    684.                     float3 defaultVertexValue = float3(0, 0, 0);
    685.                 #endif
    686.                 float3 vertexValue = defaultVertexValue;
    687.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    688.                     v.vertex.xyz = vertexValue;
    689.                 #else
    690.                     v.vertex.xyz += vertexValue;
    691.                 #endif
    692.  
    693.                 v.ase_normal = v.ase_normal;
    694.  
    695.                 float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
    696.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    697.                 o.worldPos = positionWS;
    698.                 #endif
    699.                 float3 normalWS = TransformObjectToWorldDir(v.ase_normal);
    700.  
    701.                 float4 clipPos = TransformWorldToHClip( ApplyShadowBias( positionWS, normalWS, _LightDirection ) );
    702.  
    703.                 #if UNITY_REVERSED_Z
    704.                     clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE);
    705.                 #else
    706.                     clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE);
    707.                 #endif
    708.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    709.                     VertexPositionInputs vertexInput = (VertexPositionInputs)0;
    710.                     vertexInput.positionWS = positionWS;
    711.                     vertexInput.positionCS = clipPos;
    712.                     o.shadowCoord = GetShadowCoord( vertexInput );
    713.                 #endif
    714.                 o.clipPos = clipPos;
    715.                 return o;
    716.             }
    717.  
    718.             #if defined(TESSELLATION_ON)
    719.             struct VertexControl
    720.             {
    721.                 float4 vertex : INTERNALTESSPOS;
    722.                 float3 ase_normal : NORMAL;
    723.              
    724.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    725.             };
    726.  
    727.             struct TessellationFactors
    728.             {
    729.                 float edge[3] : SV_TessFactor;
    730.                 float inside : SV_InsideTessFactor;
    731.             };
    732.  
    733.             VertexControl vert ( VertexInput v )
    734.             {
    735.                 VertexControl o;
    736.                 UNITY_SETUP_INSTANCE_ID(v);
    737.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    738.                 o.vertex = v.vertex;
    739.                 o.ase_normal = v.ase_normal;
    740.              
    741.                 return o;
    742.             }
    743.  
    744.             TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
    745.             {
    746.                 TessellationFactors o;
    747.                 float4 tf = 1;
    748.                 float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
    749.                 float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
    750.                 #if defined(ASE_FIXED_TESSELLATION)
    751.                 tf = FixedTess( tessValue );
    752.                 #elif defined(ASE_DISTANCE_TESSELLATION)
    753.                 tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
    754.                 #elif defined(ASE_LENGTH_TESSELLATION)
    755.                 tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
    756.                 #elif defined(ASE_LENGTH_CULL_TESSELLATION)
    757.                 tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
    758.                 #endif
    759.                 o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
    760.                 return o;
    761.             }
    762.  
    763.             [domain("tri")]
    764.             [partitioning("fractional_odd")]
    765.             [outputtopology("triangle_cw")]
    766.             [patchconstantfunc("TessellationFunction")]
    767.             [outputcontrolpoints(3)]
    768.             VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
    769.             {
    770.                return patch[id];
    771.             }
    772.  
    773.             [domain("tri")]
    774.             VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
    775.             {
    776.                 VertexInput o = (VertexInput) 0;
    777.                 o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
    778.                 o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
    779.              
    780.                 #if defined(ASE_PHONG_TESSELLATION)
    781.                 float3 pp[3];
    782.                 for (int i = 0; i < 3; ++i)
    783.                     pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
    784.                 float phongStrength = _TessPhongStrength;
    785.                 o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
    786.                 #endif
    787.                 UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
    788.                 return VertexFunction(o);
    789.             }
    790.             #else
    791.             VertexOutput vert ( VertexInput v )
    792.             {
    793.                 return VertexFunction( v );
    794.             }
    795.             #endif
    796.  
    797.             half4 frag(VertexOutput IN  ) : SV_TARGET
    798.             {
    799.                 UNITY_SETUP_INSTANCE_ID( IN );
    800.                 UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
    801.              
    802.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    803.                 float3 WorldPosition = IN.worldPos;
    804.                 #endif
    805.                 float4 ShadowCoords = float4( 0, 0, 0, 0 );
    806.  
    807.                 #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    808.                     #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
    809.                         ShadowCoords = IN.shadowCoord;
    810.                     #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
    811.                         ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
    812.                     #endif
    813.                 #endif
    814.  
    815.              
    816.                 float Alpha = 1;
    817.                 float AlphaClipThreshold = 0.5;
    818.                 float AlphaClipThresholdShadow = 0.5;
    819.  
    820.                 #ifdef _ALPHATEST_ON
    821.                     #ifdef _ALPHATEST_SHADOW_ON
    822.                         clip(Alpha - AlphaClipThresholdShadow);
    823.                     #else
    824.                         clip(Alpha - AlphaClipThreshold);
    825.                     #endif
    826.                 #endif
    827.  
    828.                 #ifdef LOD_FADE_CROSSFADE
    829.                     LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
    830.                 #endif
    831.                 return 0;
    832.             }
    833.  
    834.             ENDHLSL
    835.         }
    836.  
    837.      
    838.         Pass
    839.         {
    840.          
    841.             Name "DepthOnly"
    842.             Tags { "LightMode"="DepthOnly" }
    843.  
    844.             ZWrite On
    845.             ColorMask 0
    846.             AlphaToMask Off
    847.  
    848.             HLSLPROGRAM
    849.             #define _NORMAL_DROPOFF_TS 1
    850.             #pragma multi_compile_instancing
    851.             #pragma multi_compile _ LOD_FADE_CROSSFADE
    852.             #pragma multi_compile_fog
    853.             #define ASE_FOG 1
    854.             #define _NORMALMAP 1
    855.             #define ASE_SRP_VERSION 70108
    856.  
    857.             #pragma prefer_hlslcc gles
    858.             #pragma exclude_renderers d3d11_9x
    859.  
    860.             #pragma vertex vert
    861.             #pragma fragment frag
    862.  
    863.             #define SHADERPASS_DEPTHONLY
    864.  
    865.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    866.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    867.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    868.             #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    869.  
    870.          
    871.  
    872.             struct VertexInput
    873.             {
    874.                 float4 vertex : POSITION;
    875.                 float3 ase_normal : NORMAL;
    876.              
    877.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    878.             };
    879.  
    880.             struct VertexOutput
    881.             {
    882.                 float4 clipPos : SV_POSITION;
    883.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    884.                 float3 worldPos : TEXCOORD0;
    885.                 #endif
    886.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    887.                 float4 shadowCoord : TEXCOORD1;
    888.                 #endif
    889.              
    890.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    891.                 UNITY_VERTEX_OUTPUT_STEREO
    892.             };
    893.  
    894.             CBUFFER_START(UnityPerMaterial)
    895.             float4 _ColorA;
    896.             float4 _BaseColor_ST;
    897.             float4 _ColorB;
    898.             float4 _ColorC;
    899.             float4 _NormalMap_ST;
    900.             float4 _Material_ST;
    901.             float _PaintGlossiness;
    902.             #ifdef _TRANSMISSION_ASE
    903.                 float _TransmissionShadow;
    904.             #endif
    905.             #ifdef _TRANSLUCENCY_ASE
    906.                 float _TransStrength;
    907.                 float _TransNormal;
    908.                 float _TransScattering;
    909.                 float _TransDirect;
    910.                 float _TransAmbient;
    911.                 float _TransShadow;
    912.             #endif
    913.             #ifdef TESSELLATION_ON
    914.                 float _TessPhongStrength;
    915.                 float _TessValue;
    916.                 float _TessMin;
    917.                 float _TessMax;
    918.                 float _TessEdgeLength;
    919.                 float _TessMaxDisp;
    920.             #endif
    921.             CBUFFER_END
    922.          
    923.  
    924.          
    925.             VertexOutput VertexFunction( VertexInput v  )
    926.             {
    927.                 VertexOutput o = (VertexOutput)0;
    928.                 UNITY_SETUP_INSTANCE_ID(v);
    929.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    930.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
    931.  
    932.              
    933.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    934.                     float3 defaultVertexValue = v.vertex.xyz;
    935.                 #else
    936.                     float3 defaultVertexValue = float3(0, 0, 0);
    937.                 #endif
    938.                 float3 vertexValue = defaultVertexValue;
    939.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    940.                     v.vertex.xyz = vertexValue;
    941.                 #else
    942.                     v.vertex.xyz += vertexValue;
    943.                 #endif
    944.  
    945.                 v.ase_normal = v.ase_normal;
    946.                 float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
    947.                 float4 positionCS = TransformWorldToHClip( positionWS );
    948.  
    949.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    950.                 o.worldPos = positionWS;
    951.                 #endif
    952.  
    953.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    954.                     VertexPositionInputs vertexInput = (VertexPositionInputs)0;
    955.                     vertexInput.positionWS = positionWS;
    956.                     vertexInput.positionCS = positionCS;
    957.                     o.shadowCoord = GetShadowCoord( vertexInput );
    958.                 #endif
    959.                 o.clipPos = positionCS;
    960.                 return o;
    961.             }
    962.  
    963.             #if defined(TESSELLATION_ON)
    964.             struct VertexControl
    965.             {
    966.                 float4 vertex : INTERNALTESSPOS;
    967.                 float3 ase_normal : NORMAL;
    968.              
    969.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    970.             };
    971.  
    972.             struct TessellationFactors
    973.             {
    974.                 float edge[3] : SV_TessFactor;
    975.                 float inside : SV_InsideTessFactor;
    976.             };
    977.  
    978.             VertexControl vert ( VertexInput v )
    979.             {
    980.                 VertexControl o;
    981.                 UNITY_SETUP_INSTANCE_ID(v);
    982.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    983.                 o.vertex = v.vertex;
    984.                 o.ase_normal = v.ase_normal;
    985.              
    986.                 return o;
    987.             }
    988.  
    989.             TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
    990.             {
    991.                 TessellationFactors o;
    992.                 float4 tf = 1;
    993.                 float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
    994.                 float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
    995.                 #if defined(ASE_FIXED_TESSELLATION)
    996.                 tf = FixedTess( tessValue );
    997.                 #elif defined(ASE_DISTANCE_TESSELLATION)
    998.                 tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
    999.                 #elif defined(ASE_LENGTH_TESSELLATION)
    1000.                 tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
    1001.                 #elif defined(ASE_LENGTH_CULL_TESSELLATION)
    1002.                 tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
    1003.                 #endif
    1004.                 o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
    1005.                 return o;
    1006.             }
    1007.  
    1008.             [domain("tri")]
    1009.             [partitioning("fractional_odd")]
    1010.             [outputtopology("triangle_cw")]
    1011.             [patchconstantfunc("TessellationFunction")]
    1012.             [outputcontrolpoints(3)]
    1013.             VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
    1014.             {
    1015.                return patch[id];
    1016.             }
    1017.  
    1018.             [domain("tri")]
    1019.             VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
    1020.             {
    1021.                 VertexInput o = (VertexInput) 0;
    1022.                 o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
    1023.                 o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
    1024.              
    1025.                 #if defined(ASE_PHONG_TESSELLATION)
    1026.                 float3 pp[3];
    1027.                 for (int i = 0; i < 3; ++i)
    1028.                     pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
    1029.                 float phongStrength = _TessPhongStrength;
    1030.                 o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
    1031.                 #endif
    1032.                 UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
    1033.                 return VertexFunction(o);
    1034.             }
    1035.             #else
    1036.             VertexOutput vert ( VertexInput v )
    1037.             {
    1038.                 return VertexFunction( v );
    1039.             }
    1040.             #endif
    1041.  
    1042.             half4 frag(VertexOutput IN  ) : SV_TARGET
    1043.             {
    1044.                 UNITY_SETUP_INSTANCE_ID(IN);
    1045.                 UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
    1046.  
    1047.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    1048.                 float3 WorldPosition = IN.worldPos;
    1049.                 #endif
    1050.                 float4 ShadowCoords = float4( 0, 0, 0, 0 );
    1051.  
    1052.                 #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    1053.                     #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
    1054.                         ShadowCoords = IN.shadowCoord;
    1055.                     #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
    1056.                         ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
    1057.                     #endif
    1058.                 #endif
    1059.  
    1060.              
    1061.                 float Alpha = 1;
    1062.                 float AlphaClipThreshold = 0.5;
    1063.  
    1064.                 #ifdef _ALPHATEST_ON
    1065.                     clip(Alpha - AlphaClipThreshold);
    1066.                 #endif
    1067.  
    1068.                 #ifdef LOD_FADE_CROSSFADE
    1069.                     LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
    1070.                 #endif
    1071.                 return 0;
    1072.             }
    1073.             ENDHLSL
    1074.         }
    1075.  
    1076.      
    1077.         Pass
    1078.         {
    1079.          
    1080.             Name "Meta"
    1081.             Tags { "LightMode"="Meta" }
    1082.  
    1083.             Cull Off
    1084.  
    1085.             HLSLPROGRAM
    1086.             #define _NORMAL_DROPOFF_TS 1
    1087.             #pragma multi_compile_instancing
    1088.             #pragma multi_compile _ LOD_FADE_CROSSFADE
    1089.             #pragma multi_compile_fog
    1090.             #define ASE_FOG 1
    1091.             #define _NORMALMAP 1
    1092.             #define ASE_SRP_VERSION 70108
    1093.  
    1094.             #pragma prefer_hlslcc gles
    1095.             #pragma exclude_renderers d3d11_9x
    1096.  
    1097.             #pragma vertex vert
    1098.             #pragma fragment frag
    1099.  
    1100.             #define SHADERPASS_META
    1101.  
    1102.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    1103.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
    1104.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    1105.             #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    1106.  
    1107.          
    1108.  
    1109.             #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
    1110.  
    1111.             struct VertexInput
    1112.             {
    1113.                 float4 vertex : POSITION;
    1114.                 float3 ase_normal : NORMAL;
    1115.                 float4 texcoord1 : TEXCOORD1;
    1116.                 float4 texcoord2 : TEXCOORD2;
    1117.                 float4 ase_texcoord : TEXCOORD0;
    1118.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    1119.             };
    1120.  
    1121.             struct VertexOutput
    1122.             {
    1123.                 float4 clipPos : SV_POSITION;
    1124.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    1125.                 float3 worldPos : TEXCOORD0;
    1126.                 #endif
    1127.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    1128.                 float4 shadowCoord : TEXCOORD1;
    1129.                 #endif
    1130.                 float4 ase_texcoord2 : TEXCOORD2;
    1131.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    1132.                 UNITY_VERTEX_OUTPUT_STEREO
    1133.             };
    1134.  
    1135.             CBUFFER_START(UnityPerMaterial)
    1136.             float4 _ColorA;
    1137.             float4 _BaseColor_ST;
    1138.             float4 _ColorB;
    1139.             float4 _ColorC;
    1140.             float4 _NormalMap_ST;
    1141.             float4 _Material_ST;
    1142.             float _PaintGlossiness;
    1143.             #ifdef _TRANSMISSION_ASE
    1144.                 float _TransmissionShadow;
    1145.             #endif
    1146.             #ifdef _TRANSLUCENCY_ASE
    1147.                 float _TransStrength;
    1148.                 float _TransNormal;
    1149.                 float _TransScattering;
    1150.                 float _TransDirect;
    1151.                 float _TransAmbient;
    1152.                 float _TransShadow;
    1153.             #endif
    1154.             #ifdef TESSELLATION_ON
    1155.                 float _TessPhongStrength;
    1156.                 float _TessValue;
    1157.                 float _TessMin;
    1158.                 float _TessMax;
    1159.                 float _TessEdgeLength;
    1160.                 float _TessMaxDisp;
    1161.             #endif
    1162.             CBUFFER_END
    1163.             sampler2D _BaseColor;
    1164.             SAMPLER(sampler_BaseColor);
    1165.  
    1166.  
    1167.          
    1168.             VertexOutput VertexFunction( VertexInput v  )
    1169.             {
    1170.                 VertexOutput o = (VertexOutput)0;
    1171.                 UNITY_SETUP_INSTANCE_ID(v);
    1172.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    1173.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
    1174.  
    1175.                 o.ase_texcoord2.xy = v.ase_texcoord.xy;
    1176.              
    1177.                 //setting value to unused interpolator channels and avoid initialization warnings
    1178.                 o.ase_texcoord2.zw = 0;
    1179.              
    1180.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    1181.                     float3 defaultVertexValue = v.vertex.xyz;
    1182.                 #else
    1183.                     float3 defaultVertexValue = float3(0, 0, 0);
    1184.                 #endif
    1185.                 float3 vertexValue = defaultVertexValue;
    1186.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    1187.                     v.vertex.xyz = vertexValue;
    1188.                 #else
    1189.                     v.vertex.xyz += vertexValue;
    1190.                 #endif
    1191.  
    1192.                 v.ase_normal = v.ase_normal;
    1193.  
    1194.                 float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
    1195.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    1196.                 o.worldPos = positionWS;
    1197.                 #endif
    1198.  
    1199.                 o.clipPos = MetaVertexPosition( v.vertex, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST );
    1200.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    1201.                     VertexPositionInputs vertexInput = (VertexPositionInputs)0;
    1202.                     vertexInput.positionWS = positionWS;
    1203.                     vertexInput.positionCS = o.clipPos;
    1204.                     o.shadowCoord = GetShadowCoord( vertexInput );
    1205.                 #endif
    1206.                 return o;
    1207.             }
    1208.  
    1209.             #if defined(TESSELLATION_ON)
    1210.             struct VertexControl
    1211.             {
    1212.                 float4 vertex : INTERNALTESSPOS;
    1213.                 float3 ase_normal : NORMAL;
    1214.                 float4 texcoord1 : TEXCOORD1;
    1215.                 float4 texcoord2 : TEXCOORD2;
    1216.                 float4 ase_texcoord : TEXCOORD0;
    1217.  
    1218.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    1219.             };
    1220.  
    1221.             struct TessellationFactors
    1222.             {
    1223.                 float edge[3] : SV_TessFactor;
    1224.                 float inside : SV_InsideTessFactor;
    1225.             };
    1226.  
    1227.             VertexControl vert ( VertexInput v )
    1228.             {
    1229.                 VertexControl o;
    1230.                 UNITY_SETUP_INSTANCE_ID(v);
    1231.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    1232.                 o.vertex = v.vertex;
    1233.                 o.ase_normal = v.ase_normal;
    1234.                 o.texcoord1 = v.texcoord1;
    1235.                 o.texcoord2 = v.texcoord2;
    1236.                 o.ase_texcoord = v.ase_texcoord;
    1237.                 return o;
    1238.             }
    1239.  
    1240.             TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
    1241.             {
    1242.                 TessellationFactors o;
    1243.                 float4 tf = 1;
    1244.                 float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
    1245.                 float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
    1246.                 #if defined(ASE_FIXED_TESSELLATION)
    1247.                 tf = FixedTess( tessValue );
    1248.                 #elif defined(ASE_DISTANCE_TESSELLATION)
    1249.                 tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
    1250.                 #elif defined(ASE_LENGTH_TESSELLATION)
    1251.                 tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
    1252.                 #elif defined(ASE_LENGTH_CULL_TESSELLATION)
    1253.                 tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
    1254.                 #endif
    1255.                 o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
    1256.                 return o;
    1257.             }
    1258.  
    1259.             [domain("tri")]
    1260.             [partitioning("fractional_odd")]
    1261.             [outputtopology("triangle_cw")]
    1262.             [patchconstantfunc("TessellationFunction")]
    1263.             [outputcontrolpoints(3)]
    1264.             VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
    1265.             {
    1266.                return patch[id];
    1267.             }
    1268.  
    1269.             [domain("tri")]
    1270.             VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
    1271.             {
    1272.                 VertexInput o = (VertexInput) 0;
    1273.                 o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
    1274.                 o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
    1275.                 o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
    1276.                 o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
    1277.                 o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
    1278.                 #if defined(ASE_PHONG_TESSELLATION)
    1279.                 float3 pp[3];
    1280.                 for (int i = 0; i < 3; ++i)
    1281.                     pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
    1282.                 float phongStrength = _TessPhongStrength;
    1283.                 o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
    1284.                 #endif
    1285.                 UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
    1286.                 return VertexFunction(o);
    1287.             }
    1288.             #else
    1289.             VertexOutput vert ( VertexInput v )
    1290.             {
    1291.                 return VertexFunction( v );
    1292.             }
    1293.             #endif
    1294.  
    1295.             half4 frag(VertexOutput IN  ) : SV_TARGET
    1296.             {
    1297.                 UNITY_SETUP_INSTANCE_ID(IN);
    1298.                 UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
    1299.  
    1300.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    1301.                 float3 WorldPosition = IN.worldPos;
    1302.                 #endif
    1303.                 float4 ShadowCoords = float4( 0, 0, 0, 0 );
    1304.  
    1305.                 #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    1306.                     #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
    1307.                         ShadowCoords = IN.shadowCoord;
    1308.                     #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
    1309.                         ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
    1310.                     #endif
    1311.                 #endif
    1312.  
    1313.                 float2 uv_BaseColor = IN.ase_texcoord2.xy * _BaseColor_ST.xy + _BaseColor_ST.zw;
    1314.                 float4 tex2DNode3 = tex2D( _BaseColor, uv_BaseColor );
    1315.              
    1316.              
    1317.                 float3 Albedo = ( ( ( _ColorA * tex2DNode3.r ) + ( _ColorB * tex2DNode3.g ) ) + ( _ColorC * tex2DNode3.b ) ).rgb;
    1318.                 float3 Emission = 0;
    1319.                 float Alpha = 1;
    1320.                 float AlphaClipThreshold = 0.5;
    1321.  
    1322.                 #ifdef _ALPHATEST_ON
    1323.                     clip(Alpha - AlphaClipThreshold);
    1324.                 #endif
    1325.  
    1326.                 MetaInput metaInput = (MetaInput)0;
    1327.                 metaInput.Albedo = Albedo;
    1328.                 metaInput.Emission = Emission;
    1329.              
    1330.                 return MetaFragment(metaInput);
    1331.             }
    1332.             ENDHLSL
    1333.         }
    1334.  
    1335.      
    1336.         Pass
    1337.         {
    1338.          
    1339.             Name "Universal2D"
    1340.             Tags { "LightMode"="Universal2D" }
    1341.  
    1342.             Blend One Zero, One Zero
    1343.             ZWrite On
    1344.             ZTest LEqual
    1345.             Offset -2 , -3
    1346.             ColorMask RGBA
    1347.  
    1348.             HLSLPROGRAM
    1349.             #define _NORMAL_DROPOFF_TS 1
    1350.             #pragma multi_compile_instancing
    1351.             #pragma multi_compile _ LOD_FADE_CROSSFADE
    1352.             #pragma multi_compile_fog
    1353.             #define ASE_FOG 1
    1354.             #define _NORMALMAP 1
    1355.             #define ASE_SRP_VERSION 70108
    1356.  
    1357.             #pragma enable_d3d11_debug_symbols
    1358.             #pragma prefer_hlslcc gles
    1359.             #pragma exclude_renderers d3d11_9x
    1360.  
    1361.             #pragma vertex vert
    1362.             #pragma fragment frag
    1363.  
    1364.             #define SHADERPASS_2D
    1365.  
    1366.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    1367.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    1368.             #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
    1369.             #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
    1370.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
    1371.          
    1372.          
    1373.  
    1374.             #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
    1375.  
    1376.             struct VertexInput
    1377.             {
    1378.                 float4 vertex : POSITION;
    1379.                 float3 ase_normal : NORMAL;
    1380.                 float4 ase_texcoord : TEXCOORD0;
    1381.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    1382.             };
    1383.  
    1384.             struct VertexOutput
    1385.             {
    1386.                 float4 clipPos : SV_POSITION;
    1387.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    1388.                 float3 worldPos : TEXCOORD0;
    1389.                 #endif
    1390.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    1391.                 float4 shadowCoord : TEXCOORD1;
    1392.                 #endif
    1393.                 float4 ase_texcoord2 : TEXCOORD2;
    1394.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    1395.                 UNITY_VERTEX_OUTPUT_STEREO
    1396.             };
    1397.  
    1398.             CBUFFER_START(UnityPerMaterial)
    1399.             float4 _ColorA;
    1400.             float4 _BaseColor_ST;
    1401.             float4 _ColorB;
    1402.             float4 _ColorC;
    1403.             float4 _NormalMap_ST;
    1404.             float4 _Material_ST;
    1405.             float _PaintGlossiness;
    1406.             #ifdef _TRANSMISSION_ASE
    1407.                 float _TransmissionShadow;
    1408.             #endif
    1409.             #ifdef _TRANSLUCENCY_ASE
    1410.                 float _TransStrength;
    1411.                 float _TransNormal;
    1412.                 float _TransScattering;
    1413.                 float _TransDirect;
    1414.                 float _TransAmbient;
    1415.                 float _TransShadow;
    1416.             #endif
    1417.             #ifdef TESSELLATION_ON
    1418.                 float _TessPhongStrength;
    1419.                 float _TessValue;
    1420.                 float _TessMin;
    1421.                 float _TessMax;
    1422.                 float _TessEdgeLength;
    1423.                 float _TessMaxDisp;
    1424.             #endif
    1425.             CBUFFER_END
    1426.             sampler2D _BaseColor;
    1427.             SAMPLER(sampler_BaseColor);
    1428.  
    1429.  
    1430.          
    1431.             VertexOutput VertexFunction( VertexInput v  )
    1432.             {
    1433.                 VertexOutput o = (VertexOutput)0;
    1434.                 UNITY_SETUP_INSTANCE_ID( v );
    1435.                 UNITY_TRANSFER_INSTANCE_ID( v, o );
    1436.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
    1437.  
    1438.                 o.ase_texcoord2.xy = v.ase_texcoord.xy;
    1439.              
    1440.                 //setting value to unused interpolator channels and avoid initialization warnings
    1441.                 o.ase_texcoord2.zw = 0;
    1442.              
    1443.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    1444.                     float3 defaultVertexValue = v.vertex.xyz;
    1445.                 #else
    1446.                     float3 defaultVertexValue = float3(0, 0, 0);
    1447.                 #endif
    1448.                 float3 vertexValue = defaultVertexValue;
    1449.                 #ifdef ASE_ABSOLUTE_VERTEX_POS
    1450.                     v.vertex.xyz = vertexValue;
    1451.                 #else
    1452.                     v.vertex.xyz += vertexValue;
    1453.                 #endif
    1454.  
    1455.                 v.ase_normal = v.ase_normal;
    1456.  
    1457.                 float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
    1458.                 float4 positionCS = TransformWorldToHClip( positionWS );
    1459.  
    1460.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    1461.                 o.worldPos = positionWS;
    1462.                 #endif
    1463.  
    1464.                 #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    1465.                     VertexPositionInputs vertexInput = (VertexPositionInputs)0;
    1466.                     vertexInput.positionWS = positionWS;
    1467.                     vertexInput.positionCS = positionCS;
    1468.                     o.shadowCoord = GetShadowCoord( vertexInput );
    1469.                 #endif
    1470.  
    1471.                 o.clipPos = positionCS;
    1472.                 return o;
    1473.             }
    1474.  
    1475.             #if defined(TESSELLATION_ON)
    1476.             struct VertexControl
    1477.             {
    1478.                 float4 vertex : INTERNALTESSPOS;
    1479.                 float3 ase_normal : NORMAL;
    1480.                 float4 ase_texcoord : TEXCOORD0;
    1481.  
    1482.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    1483.             };
    1484.  
    1485.             struct TessellationFactors
    1486.             {
    1487.                 float edge[3] : SV_TessFactor;
    1488.                 float inside : SV_InsideTessFactor;
    1489.             };
    1490.  
    1491.             VertexControl vert ( VertexInput v )
    1492.             {
    1493.                 VertexControl o;
    1494.                 UNITY_SETUP_INSTANCE_ID(v);
    1495.                 UNITY_TRANSFER_INSTANCE_ID(v, o);
    1496.                 o.vertex = v.vertex;
    1497.                 o.ase_normal = v.ase_normal;
    1498.                 o.ase_texcoord = v.ase_texcoord;
    1499.                 return o;
    1500.             }
    1501.  
    1502.             TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
    1503.             {
    1504.                 TessellationFactors o;
    1505.                 float4 tf = 1;
    1506.                 float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
    1507.                 float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
    1508.                 #if defined(ASE_FIXED_TESSELLATION)
    1509.                 tf = FixedTess( tessValue );
    1510.                 #elif defined(ASE_DISTANCE_TESSELLATION)
    1511.                 tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
    1512.                 #elif defined(ASE_LENGTH_TESSELLATION)
    1513.                 tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
    1514.                 #elif defined(ASE_LENGTH_CULL_TESSELLATION)
    1515.                 tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
    1516.                 #endif
    1517.                 o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
    1518.                 return o;
    1519.             }
    1520.  
    1521.             [domain("tri")]
    1522.             [partitioning("fractional_odd")]
    1523.             [outputtopology("triangle_cw")]
    1524.             [patchconstantfunc("TessellationFunction")]
    1525.             [outputcontrolpoints(3)]
    1526.             VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
    1527.             {
    1528.                return patch[id];
    1529.             }
    1530.  
    1531.             [domain("tri")]
    1532.             VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
    1533.             {
    1534.                 VertexInput o = (VertexInput) 0;
    1535.                 o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
    1536.                 o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
    1537.                 o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
    1538.                 #if defined(ASE_PHONG_TESSELLATION)
    1539.                 float3 pp[3];
    1540.                 for (int i = 0; i < 3; ++i)
    1541.                     pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
    1542.                 float phongStrength = _TessPhongStrength;
    1543.                 o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
    1544.                 #endif
    1545.                 UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
    1546.                 return VertexFunction(o);
    1547.             }
    1548.             #else
    1549.             VertexOutput vert ( VertexInput v )
    1550.             {
    1551.                 return VertexFunction( v );
    1552.             }
    1553.             #endif
    1554.  
    1555.             half4 frag(VertexOutput IN  ) : SV_TARGET
    1556.             {
    1557.                 UNITY_SETUP_INSTANCE_ID( IN );
    1558.                 UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
    1559.  
    1560.                 #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
    1561.                 float3 WorldPosition = IN.worldPos;
    1562.                 #endif
    1563.                 float4 ShadowCoords = float4( 0, 0, 0, 0 );
    1564.  
    1565.                 #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
    1566.                     #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
    1567.                         ShadowCoords = IN.shadowCoord;
    1568.                     #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
    1569.                         ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
    1570.                     #endif
    1571.                 #endif
    1572.  
    1573.                 float2 uv_BaseColor = IN.ase_texcoord2.xy * _BaseColor_ST.xy + _BaseColor_ST.zw;
    1574.                 float4 tex2DNode3 = tex2D( _BaseColor, uv_BaseColor );
    1575.              
    1576.              
    1577.                 float3 Albedo = ( ( ( _ColorA * tex2DNode3.r ) + ( _ColorB * tex2DNode3.g ) ) + ( _ColorC * tex2DNode3.b ) ).rgb;
    1578.                 float Alpha = 1;
    1579.                 float AlphaClipThreshold = 0.5;
    1580.  
    1581.                 half4 color = half4( Albedo, Alpha );
    1582.  
    1583.                 #ifdef _ALPHATEST_ON
    1584.                     clip(Alpha - AlphaClipThreshold);
    1585.                 #endif
    1586.  
    1587.                 return color;
    1588.             }
    1589.             ENDHLSL
    1590.         }
    1591.      
    1592.     }
    1593.     /*ase_lod*/
    1594.     CustomEditor "UnityEditor.ShaderGraph.PBRMasterGUI"
    1595.     Fallback "Hidden/InternalErrorShader"
    1596.  
    1597. }
    1598. /*ASEBEGIN
    1599. Version=18400
    1600. 2116;84;1426;819;2654.426;591.5717;1.66536;True;False
    1601. Node;AmplifyShaderEditor.SamplerNode;3;-3445.724,-1168.784;Inherit;True;Property;_BaseColor;Base Color;1;0;Create;True;0;0;False;0;False;-1;None;e6d295722049b3b41b9635ce42d8a02d;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    1602. Node;AmplifyShaderEditor.ColorNode;11;-3310.181,-1707.945;Float;False;Property;_ColorB;Color B;6;0;Create;True;0;0;False;0;False;0,1,0,0;0.9632353,0.9373235,0.7861702,1;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    1603. Node;AmplifyShaderEditor.ColorNode;6;-3271.726,-1996.152;Float;False;Property;_ColorA;Color A;5;0;Create;True;0;0;False;0;False;1,0,0,0;1,0.6547687,0.4264705,1;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    1604. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;9;-2844.295,-1951.033;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
    1605. Node;AmplifyShaderEditor.ColorNode;14;-3295.735,-1413.051;Float;False;Property;_ColorC;Color C;7;0;Create;True;0;0;False;0;False;0,0,1,0;0.6911764,0.6251082,0.6671517,1;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    1606. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;12;-2873.602,-1653.586;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
    1607. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;15;-2854.467,-1403.2;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
    1608. Node;AmplifyShaderEditor.SimpleAddOpNode;13;-2630.876,-1763.957;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
    1609. Node;AmplifyShaderEditor.SaturateNode;91;-3038.077,-181.0338;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
    1610. Node;AmplifyShaderEditor.SimpleAddOpNode;16;-2463.344,-1437.123;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
    1611. Node;AmplifyShaderEditor.SamplerNode;50;-1322.21,324.4493;Inherit;True;Property;_NormalMap;Normal Map;2;0;Create;True;0;0;False;0;False;-1;None;20685e092f7090641b057aab4ff6b4bc;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    1612. Node;AmplifyShaderEditor.SamplerNode;38;-1965.279,127.8819;Inherit;True;Property;_Material;Material;3;0;Create;True;0;0;False;0;False;-1;None;f9016f14b7eec314d8b23421a730250d;True;0;False;black;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    1613. Node;AmplifyShaderEditor.RangedFloatNode;46;-1922.678,-395.1461;Float;False;Property;_PaintGlossiness;Paint Glossiness;9;0;Create;True;0;0;False;0;False;0;0.5;0;1;0;1;FLOAT;0
    1614. Node;AmplifyShaderEditor.LerpOp;76;-1639.209,-196.0829;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
    1615. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;94;-3224.632,-390.7604;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    1616. Node;AmplifyShaderEditor.SamplerNode;30;-4327.819,-293.2986;Inherit;True;Property;_GreyscaleAgeMap;Greyscale Age Map;4;0;Create;True;0;0;False;0;False;-1;None;d53a1745260bd0e448df9907dac1f929;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    1617. Node;AmplifyShaderEditor.SimpleAddOpNode;36;-3398.289,-187.7652;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    1618. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;31;-3603.01,-36.28038;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    1619. Node;AmplifyShaderEditor.SimpleSubtractOpNode;28;-3760.78,-219.2119;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    1620. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;34;-3913.069,45.72855;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    1621. Node;AmplifyShaderEditor.RangedFloatNode;35;-4225.579,56.37645;Float;False;Constant;_Float3;Float 3;7;0;Create;True;0;0;False;0;False;5;0;0;0;0;1;FLOAT;0
    1622. Node;AmplifyShaderEditor.RangedFloatNode;29;-4002.144,-127.6892;Float;False;Constant;_Float1;Float 1;5;0;Create;True;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0
    1623. Node;AmplifyShaderEditor.RangedFloatNode;33;-4313.269,-46.31102;Float;False;Property;_AgeMapContrast;Age Map Contrast;8;0;Create;True;0;0;False;0;False;0;0.2;0;1;0;1;FLOAT;0
    1624. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;99;-789.0698,-208.0267;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;True;0;False;-1;True;True;True;True;True;0;False;-1;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;0;False;0;Hidden/InternalErrorShader;0;0;Standard;0;True;0
    1625. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;100;-789.0698,-208.0267;Float;False;True;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;Quantum Theory/URP/PBR - Rome Multicolored Fresco Decal Layer 2;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;17;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;1;False;-1;True;3;False;-1;True;True;-2;False;-1;-3;False;-1;True;1;LightMode=UniversalForward;False;0;Hidden/InternalErrorShader;0;0;Standard;35;Workflow;1;Surface;0;  Refraction Model;0;  Blend;0;Two Sided;1;Fragment Normal Space,InvertActionOnDeselection;0;Transmission;0;  Transmission Shadow;0.5,False,-1;Translucency;0;  Translucency Strength;1,False,-1;  Normal Distortion;0.5,False,-1;  Scattering;2,False,-1;  Direct;0.9,False,-1;  Ambient;0.1,False,-1;  Shadow;0.5,False,-1;Cast Shadows;1;  Use Shadow Threshold;0;Receive Shadows;1;GPU Instancing;1;LOD CrossFade;1;Built-in Fog;1;Meta Pass;1;Override Baked GI;0;Extra Pre Pass;0;DOTS Instancing;0;Tessellation;0;  Phong;0;  Strength;0.5,False,-1;  Type;0;  Tess;16,False,-1;  Min;10,False,-1;  Max;25,False,-1;  Edge Length;16,False,-1;  Max Displacement;25,False,-1;Vertex Position,InvertActionOnDeselection;1;0;6;False;True;True;True;True;True;False;;True;0
    1626. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;101;-789.0698,-208.0267;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=ShadowCaster;False;0;Hidden/InternalErrorShader;0;0;Standard;0;True;0
    1627. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;102;-789.0698,-208.0267;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;False;False;False;False;0;False;-1;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=DepthOnly;False;0;Hidden/InternalErrorShader;0;0;Standard;0;True;0
    1628. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;103;-789.0698,-208.0267;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;0;Hidden/InternalErrorShader;0;0;Standard;0;True;0
    1629. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;104;-789.0698,-208.0267;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;True;0;False;-1;True;0;False;-1;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;True;1;False;-1;True;3;False;-1;True;True;-2;False;-1;-3;False;-1;True;1;LightMode=Universal2D;False;0;Hidden/InternalErrorShader;0;0;Standard;0;True;0
    1630. Node;AmplifyShaderEditor.CommentaryNode;98;-2902.731,-788.3595;Inherit;False;977.1169;100;The only difference between this shader and Rome Fresco Decal is the Depth Offset values in the shader properties.;0;Difference;1,1,1,1;0;0
    1631. WireConnection;9;0;6;0
    1632. WireConnection;9;1;3;1
    1633. WireConnection;12;0;11;0
    1634. WireConnection;12;1;3;2
    1635. WireConnection;15;0;14;0
    1636. WireConnection;15;1;3;3
    1637. WireConnection;13;0;9;0
    1638. WireConnection;13;1;12;0
    1639. WireConnection;91;0;94;0
    1640. WireConnection;16;0;13;0
    1641. WireConnection;16;1;15;0
    1642. WireConnection;76;0;38;4
    1643. WireConnection;76;1;46;0
    1644. WireConnection;76;2;91;0
    1645. WireConnection;94;0;36;0
    1646. WireConnection;94;1;3;4
    1647. WireConnection;36;0;31;0
    1648. WireConnection;36;1;29;0
    1649. WireConnection;31;0;28;0
    1650. WireConnection;31;1;34;0
    1651. WireConnection;28;0;30;2
    1652. WireConnection;28;1;29;0
    1653. WireConnection;34;0;33;0
    1654. WireConnection;34;1;35;0
    1655. WireConnection;100;0;16;0
    1656. WireConnection;100;1;50;0
    1657. WireConnection;100;3;38;1
    1658. WireConnection;100;4;46;0
    1659. WireConnection;100;5;38;2
    1660. ASEEND*/
    1661. //CHKSM=ABE48B9B68874BC3D46EC236CDA666555031C648
     
    Last edited: Sep 6, 2022
  30. Shinekaze

    Shinekaze

    Joined:
    Apr 3, 2022
    Posts:
    4
    I managed a solution based on the recommendation from Pete_Matterfield:

    In the forward pass for the shader I added two #pragma declarations, but most important, the Alpha was originally declared as just 1. I changed that to tex2DNode3.a to access the alpha channel of the decal image.
    upload_2022-9-6_19-27-54.png
    upload_2022-9-6_19-28-57.png

    Edit: Further testing suggests I may have been wrong, that this wasn't the solution, however I still got to the desired objective. After switching branches, I couldn't get the code above to work again directly. I was able to get it to work after messing with it, but in the end it was setting the material's shader to Unity's URP/Lit shader, setting surface type to transparent, and enabling alpha clipping, then swapping back to the custom shader from the Rome asset pack. Somehow that tricked it into working.
     
    Last edited: Sep 6, 2022