+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// static float GetLensFlareLightAttenuation(Light light, Camera cam, Vector3 wo)
+ /// {
+ /// switch (light.type)
+ /// {
+ /// case LightType.Directional:
+ /// return LensFlareCommonSRP.ShapeAttenuationDirLight(light.transform.forward, cam.transform.forward);
+ /// case LightType.Point:
+ /// // Do nothing point are omnidirectional for the lens flare
+ /// return LensFlareCommonSRP.ShapeAttenuationPointLight();
+ /// case LightType.Spot:
+ /// float innerSpotPercent01 = 1;
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotConeLight(light.transform.forward, wo, light.spotAngle, light.innerSpotAngle / 180.0f);
+ /// case LightType.Pyramid:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotPyramidLight(light.transform.forward, wo);
+ /// case LightType.Box:
+ /// return LensFlareCommonSRP.ShapeAttenuationSpotBoxLight(light.transform.forward, wo);
+ /// case LightType.Rectangle:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaRectangleLight(light.transform.forward, wo);
+ /// case LightType.Tube:
+ /// float shapeWidth = 1; // Get this data from an external source if our render pipeline supports tube lights.
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaTubeLight(light.transform.position, light.transform.right, shapeWidth, cam);
+ /// case LightType.Disc:
+ /// return LensFlareCommonSRP.ShapeAttenuationAreaDiscLight(light.transform.forward, wo);
+ /// default: throw new Exception($"GetLensFlareLightAttenuation HDLightType Unknown {typeof(LightType)}: {light.type}");
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ ///
+ /// public static class RenderGraphHelper
+ /// {
+ /// public static bool enableCompilationCaching
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<RenderGraphGlobalSettings>();
+ /// if (gs == null) //not in SRP
+ /// return false;
+ /// return gs.enableCompilationCaching;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ ///
+ /// public static class RPAssetIncludedHelper
+ /// {
+ /// public static string label
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<IncludeAdditionalRPAssets>();
+ /// if (gs == null) //not in SRP
+ /// return null;
+ /// if (!gs.includeAssetsByLabel)
+ /// return null;
+ /// return gs.labelToInclude;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ ///
+ /// public static class ShaderStrippingHelper
+ /// {
+ /// public static bool exportLog
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<ShaderStrippingSetting>();
+ /// if (gs == null) //not in any SRP
+ /// return false;
+ /// return gs.exportShaderVariants;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// | | X | |
+ /// // | | + + - +---+ - +
+ /// // | | / | | | |
+ /// // +-------+ + - + - + - +
+ /// Vector4 center3by3 = new Vector4(1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f);
+ /// Blitter.BlitCubeToOctahedral2DQuad(cmd, source, center3by3, 2);
+ /// ]]>
+ /// | | X | |
+ /// // | | + + - +---+ - +
+ /// // | | / | | | |
+ /// // +-------+ + - + - + - +
+ /// // Desired padding on the destination rect
+ /// int paddingInPixelsOneDirection = 16;
+ /// // Multiply by two for the total padding along an axis.
+ /// int paddingInPixels = 2 * paddingInPixelsOneDirection;
+ /// Vector4 center3by3 = new Vector4(1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f);
+ /// Vector2 subTextureSize = new Vector2(sourceWidth, sourceHeight);
+ /// // HDR to non-HDR decoding is not necessary here so drop the
+ /// // last parameter.
+ /// Blitter.BlitCubeToOctahedral2DQuadWithPadding(cmd, source, subTextureSize, center3by3, 2, paddingInPixels);
+ /// ]]>
+ /// | | X | |
+ /// // | | + + - +---+ - +
+ /// // | | / | | | |
+ /// // +-------+ + - + - + - +
+ /// Vector4 center3by3 = new Vector4(1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f);
+ /// Blitter.BlitCubeToOctahedral2DQuadSingleChannel(cmd, source, center3by3, 2);
+ /// ]]>
+ ///
+ ///
+ /// [VolumeComponentMenu("MyVolumeCategory/LightingEffects")]
+ /// public class CustomLightingVolume : VolumeComponent { ... }
+ ///
+ ///
/// using UnityEngine.Rendering;
///
@@ -92,6 +122,12 @@ public sealed class VolumeComponentDeprecated : Attribute
/// public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, 0f, 1f);
/// }
///
+ ///
+ ///
-![]() |
-
- |
-
-In this example, the red channel has a gradient that reduces the first and second simulation bands. The noise on the green channel reduces ripples. For more information, refer to the Water Mask property description. - | -
Property | -Description | -|
---|---|---|
Influence Volume | -||
Shape | -Set the shape of the Adjustment Volume to either Box or Sphere. | -|
Size | -Set the size of the Adjustment Volume. This property only appears if you set Shape to Box. | -|
Radius | -Set the radius of the Adjustment Volume. This property only appears if you set Shape to Sphere. | -|
Mode | -
- Select how to override probes inside the Adjustment Volume. -
|
- |
Dilation Validity Threshold | -
- Override the ratio of backfaces a probe samples before HDRP considers it invalid. This option only appears if you set Mode to Override Validity Threshold, and you enable Additional Properties. - |
- |
Virtual Offset Rotation | -
- Set the rotation angle for the Virtual Offset vector on all probes in the Adjustment Volume. This option only appears if you set Mode to Apply Virtual Offset. - |
- |
Virtual Offset Distance | -
- Set how far HDRP pushes probes along the Virtual Offset Rotation vector. This option only appears if you set Mode to Apply Virtual Offset. - |
- |
Geometry Bias | -
- Sets how far HDRP pushes a probe's capture point out of geometry after one of its sampling rays hits geometry. This option only appears if you set Mode to Override Virtual Offset Settings. - |
- |
Ray Origin Bias | -Override the distance between a probe's center and the point HDRP uses to determine the origin of that probe's sampling ray. This can be used to push rays beyond nearby geometry if the geometry causes issues. This option appears only if you set Mode to Override Virtual Offset Settings. - |
- |
Intensity Scale | -
- Change the brightness of all probes covered by the Probe Volumes Adjustment Volume component. Use this sparingly, because changing the intensity of probe data can lead to inconsistencies in the lighting. This option only appears if you set Mode to Intensity Scale. - |
- |
Preview Probe Adjustments | -
- Preview the effect of the adjustments in the Scene view and the Rendering Debugger. - |
- |
Bake Probe Volumes | -
- Bake the Adaptive Probe Volumes with the adjustments. - |
-
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.HighDefinition;
+ ///
+ /// public static class URPDefaultVolumeProfileHelper
+ /// {
+ /// public static VolumeProfile volumeProfile
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<URPDefaultVolumeProfileSettings>();
+ /// if (gs == null) //not in HDRP
+ /// return null;
+ /// return gs.volumeProfile;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.HighDefinition;
+ ///
+ /// public static class HDRPLookDevVolumeProfileHelper
+ /// {
+ /// public static VolumeProfile volumeProfile
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<LookDevVolumeProfileSettings>();
+ /// if (gs == null) //not in HDRP or in a Player
+ /// return null;
+ /// return gs.volumeProfile;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// Volumes defaultVolumes = Volumes.NewDefault();
+ ///
+ ///
+ /// // Example of usage:
+ /// if (UsesQualitySettings())
+ /// {
+ /// // Adjust parameters based on quality settings
+ /// }
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPUniversalRendererDebugShadersHelper
+ /// {
+ /// public static Shader replacementPS
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRenderPipelineDebugShaders>();
+ /// if (gs == null) //not in URP or not in development build
+ /// return null;
+ /// return gs.debugReplacementPS;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPUniversalRendererRuntimeShadersHelper
+ /// {
+ /// public static Shader blit
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRenderPipelineRuntimeShaders>();
+ /// if (gs == null) //not in URP
+ /// return null;
+ /// return gs.coreBlitPS;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPUniversalRendererRuntimeTexturesHelper
+ /// {
+ /// public static Texture blueNoise
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRenderPipelineRuntimeTextures>();
+ /// if (gs == null) //not in URP
+ /// return null;
+ /// return gs.blueNoise64LTex;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPUniversalRendererRuntimeXRResourcesHelper
+ /// {
+ /// public static Shader motionVector
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRenderPipelineRuntimeXRResources>();
+ /// if (gs == null) //not in URP or XR not enabled
+ /// return null;
+ /// return gs.xrMotionVector;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPUniversalRendererResourcesHelper
+ /// {
+ /// public static Shader motionVector
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRendererResources>();
+ /// if (gs == null) //not in URP or not with UniversalRenderer
+ /// return null;
+ /// return gs.cameraMotionVector;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPRenderGraphHelper
+ /// {
+ /// public static bool enabled
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<RenderGraphSettings>();
+ /// if (gs == null) //not in URP
+ /// return false;
+ /// return !gs.enableRenderCompatibilityMode;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPDefaultVolumeProfileHelper
+ /// {
+ /// public static VolumeProfile volumeProfile
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<URPDefaultVolumeProfileSettings>();
+ /// if (gs == null) //not in URP
+ /// return null;
+ /// return gs.volumeProfile;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ /// // Get the current version of the volume profile settings
+ /// int currentVersion = GraphicsSettings.GetRenderPipelineSettings<URPDefaultVolumeProfileSettings>().version;
+ ///
+ ///
+ /// // Set the default volume profile to a new profile
+ /// var urpDefaultVolumeProfileSettings = GraphicsSettings.GetRenderPipelineSettings<URPDefaultVolumeProfileSettings>();
+ /// urpDefaultVolumeProfileSettings.volumeProfile = newVolumeProfile;
+ ///
+ ///
+ /// using UnityEngine.Rendering;
+ /// using UnityEngine.Rendering.Universal;
+ ///
+ /// public static class URPShaderStrippingHelper
+ /// {
+ /// public static bool enabled
+ /// {
+ /// get
+ /// {
+ /// var gs = GraphicsSettings.GetRenderPipelineSettings<URPShaderStrippingSetting>();
+ /// if (gs == null) //not in URP or in a Player
+ /// return false;
+ /// return gs.stripUnusedVariants;
+ /// }
+ /// }
+ /// }
+ ///
+ /// Property | URP Lit | URP Unlit | Built-In Render Pipeline |
Workflow Mode | See the URP documentation for the Lit URP Shader. | Not applicable. | Not applicable. |
Workflow Mode | See the URP documentation for the Lit URP Shader. | Not applicable. | Not applicable. |
Receive Shadows | |||
Cast Shadows | This property is only exposed if Allow Material Override is enabled for this Shader Graph. Enable this property to make it possible for a GameObject using this shader to cast shadows onto itself and other GameObjects. This corresponds to the SubShader Tag ForceNoShadowCasting. | Not applicable. | |
Surface Type | See the URP documentation for the Lit and Unlit Shaders. | In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation. | |
Surface Type | See the URP documentation for the Lit and Unlit Shaders. | In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation. | |
Render Face | In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation. |