Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VFXDefines.hlsl 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  2. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  3. #if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
  4. #define USE_FOG 1
  5. #endif
  6. #if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
  7. #define CameraBuffer Texture2DArray
  8. #define VFXSamplerCameraBuffer VFXSampler2DArray
  9. #else
  10. #define CameraBuffer Texture2D
  11. #define VFXSamplerCameraBuffer VFXSampler2D
  12. #endif
  13. #if IS_TRANSPARENT_PARTICLE
  14. #define _SURFACE_TYPE_TRANSPARENT
  15. #endif
  16. #if VFX_SIX_WAY_COLOR_ABSORPTION
  17. #define _SIX_WAY_COLOR_ABSORPTION
  18. #endif
  19. //URP currently does not allow to know the blend mode in the shader in general, but we have this information in VFX generated shaders.
  20. #if VFX_BLENDMODE_PREMULTIPLY
  21. #define _BLENDMODE_PREMULTIPLY
  22. #endif
  23. // this is only necessary for the old VFXTarget pathway
  24. // it defines the macro used to access hybrid instanced properties
  25. // (new HDRP/URP Target pathway overrides the type so this is never used)
  26. #define UNITY_ACCESS_HYBRID_INSTANCED_PROP(name, type) name
  27. #define USE_MULTI_COMPILE_XR_IN_OUTPUT_UPDATE 1
  28. //Unlit can use the DepthNormal pass which creates a discrepancy while computing depth
  29. #define FORCE_NORMAL_OUTPUT_UNLIT_VERTEX_SHADER 1
  30. #if USE_GEOMETRY_SHADER
  31. #define CULL_VERTEX(o) return;
  32. #else
  33. #define CULL_VERTEX(o) { o.VFX_VARYING_POSCS.x = VFX_NAN; return o; }
  34. #endif