2. Navigate to ___Edit > Project Settings > Graphics___ and add the Lightweight Render Pipeline Asset you created to the __Render Pipeline Settings__ field.
Note: Always store your new Render Pipeline Asset outside of the Scriptable Render Pipeline folder. This ensures that your Lightweight settings are not lost when merging new changes from the SRP repo.
## Sample Scenes in ScriptableRenderPipelineData
If you want some sample scenes to use with SRP, you can find them at the [ScriptableRenderPipelineData GitHub repository](https://github.com/Unity-Technologies/ScriptableRenderPipelineData).
Clone the repo into your project's Assets\ folder, likely alongside your ScriptableRenderPipeline clone folder. You can use the same cloning process as described above for the main ScriptableRenderPipeline repo.
Previous iterations of the ScriptableRenderPipeline repo owned this sample scene data, in case you noticed it before, and wondered where it went.
normalToWorldBatch[instanceCount].m03=fadeFactor*m_Blend;// vector3 rotation matrix so bottom row and last column can be used for other data to save space
normalToWorldBatch[instanceCount].m13=m_DiffuseTexIndex;// texture atlas indices needed for clustered
new[]{_.GetContent("Near|The closest point relative to the camera that drawing will occur."),_.GetContent("Far|The furthest point relative to the camera that drawing will occur.\n")});
publicreadonlyGUIContentmaxSmoothness=newGUIContent("Max Smoothness","Very low cost way of faking spherical area lighting. This will modify the roughness of the material lit. This is useful when the specular highlight is too small or too sharp.");
publicreadonlyGUIContentaffectDiffuse=newGUIContent("Affect Diffuse","This will disable diffuse lighting for this light. Doesn't save performance, diffuse lighting is still computed.");
publicreadonlyGUIContentcontactShadowLength=newGUIContent("Length","Length of rays used to gather contact shadows in world units.\nZero will disable the feature.");
publicreadonlyGUIContentcontactShadowDistanceScaleFactor=newGUIContent("Distance Scale Factor","Contact Shadows are scaled up with distance. Use this parameter to dampen this effect.");
publicreadonlyGUIContentcontactShadowMaxDistance=newGUIContent("Max Distance","Distance from the camera in world units at which contact shadows are faded out to zero.");
publicreadonlyGUIContentcontactShadowFadeDistance=newGUIContent("Fade Distance","Distance in world units over which the contact shadows are faded out (see Max Distance).");
publicreadonlyGUIContentcontactShadowSampleCount=newGUIContent("Sample Count","Number of samples when ray casting.");
EditorGUI.BeginChangeCheck();// For GI we need to detect any change on additional data and call SetLightDirty + For intensity we need to detect light shape change
EditorGUI.BeginChangeCheck();// For GI we need to detect any change on additional data and call SetLightDirty
// LightShape is HD specific, it need to drive LightType from the original LightType
// when it make sense, so the GI is still in sync with the light shape
// In both forward and deferred, everything opaque should have been rendered at this point so we can safely copy the depth buffer for later processing.
// This particular case is for blitting a camera-scaled texture into a non scaling texture. So we setup the full viewport (implicit in cmd.Blit) but have to scale the input UVs.
// This particular case is for blitting a non-scaled texture into a scaled texture. So we setup the partial viewport but don't scale the input UVs.
// To be able to have correct default values for our lights and to also control the conversion of intensity from the light editor (so it is compatible with GI)
// we add intensity (for each type of light we want to manage).
publicfloatdirectionalIntensity=Mathf.PI;// In Lux
publicfloatpunctualIntensity=600.0f;// Light default to 600 lumen, i.e ~48 candela
publicfloatareaIntensity=200.0f;// Light default to 200 lumen to better match point light
[Range(0.0f, 100.0f)]
publicfloatm_InnerSpotPercent=0.0f;// To display this field in the UI this need to be public
s_DecalDatas.SetData(DecalSystem.m_DecalDatas,0,0,Math.Min(DecalSystem.m_DecalDatasCount,k_MaxDecalsOnScreen));// don't add more than the size of the buffer
// Apply BSDF-specific diffuse transmission to attenuation. See also: [SSS-NOTE-TRSM]
// We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF().
float intensity = max(0, attenuation * backNdotL); // Warning: attenuation can be greater than 1 due to the inverse square attenuation (when position is close to light)
m_SkyHDRIMaterial.SetVector(HDShaderIDs._SkyParam,newVector4(m_HdriSkyParams.exposure,m_HdriSkyParams.multiplier,-m_HdriSkyParams.rotation,0.0f));// -rotation to match Legacy...
// This matrix needs to be updated at the draw call frequency.
Debug.LogWarningFormat("Missing attribute SkyUniqueID on class {0}. Class won't be registered as an available sky.",skyType);
}
if(uniqueID==0)
if(uniqueID==0)
{
Debug.LogWarningFormat("0 is a reserved SkyUniqueID and is used in class {0}. Class won't be registered as an available sky.",skyType);
continue;
if(m_SkyTypesDict.TryGetValue(uniqueID,outvalue))
if(m_SkyTypesDict.TryGetValue(uniqueID,outvalue))
{
Debug.LogWarningFormat("SkyUniqueID {0} used in class {1} is already used in class {2}. Class won't be registered as an available sky.",uniqueID,skyType,value);
// For the baking sky, we don't want to take the sun into account because we usually won't include it (this would cause double highlight in the reflection for example).
// So we pass null so that's it doesn't affect the hash and the rendering.