Lux URP Fast Outlines AlphaTested Inputs.hlsl 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef INPUT_LUXLWRP_BASE_INCLUDED
  2. #define INPUT_LUXLWRP_BASE_INCLUDED
  3. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  4. // defines a bunch of helper functions (like lerpwhiteto)
  5. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl"
  6. // defines SurfaceData, textures and the functions Alpha, SampleAlbedoAlpha, SampleNormal, SampleEmission
  7. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl"
  8. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  9. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
  10. // Material Inputs
  11. CBUFFER_START(UnityPerMaterial)
  12. half4 _BaseColor;
  13. half _Cutoff;
  14. float4 _BaseMap_ST;
  15. half4 _OutlineColor;
  16. half _Border;
  17. float4 _BaseMap_TexelSize;
  18. CBUFFER_END
  19. // Additional textures
  20. // Global Inputs
  21. // Structs
  22. struct VertexInputSimple
  23. {
  24. float3 positionOS : POSITION;
  25. float2 texcoord : TEXCOORD0;
  26. UNITY_VERTEX_INPUT_INSTANCE_ID
  27. };
  28. struct VertexOutputSimple
  29. {
  30. float4 positionCS : SV_POSITION;
  31. float2 uv : TEXCOORD0;
  32. #if defined(_APPLYFOG)
  33. half fogFactor : TEXCOORD1;
  34. #endif
  35. UNITY_VERTEX_INPUT_INSTANCE_ID
  36. UNITY_VERTEX_OUTPUT_STEREO
  37. };
  38. struct SurfaceDescriptionSimple
  39. {
  40. half alpha;
  41. };
  42. // Helper
  43. inline float2 shufflefast (float2 offset, float2 shift) {
  44. return offset * shift;
  45. }
  46. #endif