__Note: The Master branch is our current development branch and may not work on the latest publicly available version of Unity. You should always use the latest release tag and latest Unity beta version for testing purposes.__
To use the latest version of the SRP, follow the instructions below:
This repository consists of a folder that needs to be placed in the Assets\ folder of your Unity project. We recommend creating a new project to test SRP. Do not clone this repo into an existing project unless you want to break it, or unless you are updating to a newer version of the SRP repo.
This repository consists of a folder that needs to be placed in the Assets\ folder of your Unity project. We recommend creating a new project to test SRP. Do not clone this repo into an existing project unless you want to break it, or unless you are updating to a newer version of the SRP repo. Your project's `packages.json` file (in either `UnityPackageManager/` or `Packages/`) does not have a dependency on any of the packages in this repository or the contained submodules.
You can use the GitHub desktop app to clone the latest version of the SRP repo or you can use GitHub console commands.
```
> git checkout Unity-2018.1.0b2 (or the latest tag)
> git submodule update --init --recursive --remote (This command fetches the Postprocessing module, which is needed to use SRP)
> git submodule update --init (This command fetches the Postprocessing module, which is needed to use SRP)
publicreadonlyGUIContentdirectionalIntensity=newGUIContent("Intensity (Lux)","Illuminance of the directional light at ground level in lux.");
publicreadonlyGUIContentpunctualIntensity=newGUIContent("Intensity (Lumen)","Luminous power of the light in lumen. Spotlight are considered as point light with barndoor so match intensity of a point light.");
publicreadonlyGUIContentareaIntensity=newGUIContent("Intensity (Lumen)","Luminous power of the light in lumen.");
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.");
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
m_DecalDatas.SetData(DecalSystem.m_DecalDatas,0,0,Math.Min(DecalSystem.m_DecalDatasCount,k_MaxDecalsOnScreen));// don't add more than the size of the buffer
newDebugUI.BoolField{displayName="Enable Fptl for Forward Opaque",getter=()=>lightLoopSettings.enableFptlForForwardOpaque,setter=value=>lightLoopSettings.enableFptlForForwardOpaque=value},
newDebugUI.BoolField{displayName="Enable Big Tile",getter=()=>lightLoopSettings.enableBigTilePrepass,setter=value=>lightLoopSettings.enableBigTilePrepass=value},
newDebugUI.BoolField{displayName="Enable Material Classification",getter=()=>lightLoopSettings.enableComputeMaterialVariants,setter=value=>lightLoopSettings.enableComputeMaterialVariants=value}
newDebugUI.BoolField{displayName="Enable Fptl for Forward Opaque",getter=()=>lightLoopSettings.enableFptlForForwardOpaque,setter=value=>lightLoopSettings.enableFptlForForwardOpaque=value},
newDebugUI.BoolField{displayName="Enable Big Tile",getter=()=>lightLoopSettings.enableBigTilePrepass,setter=value=>lightLoopSettings.enableBigTilePrepass=value},
newDebugUI.BoolField{displayName="Enable Material Classification",getter=()=>lightLoopSettings.enableComputeMaterialVariants,setter=value=>lightLoopSettings.enableComputeMaterialVariants=value}
m_faceWorldToViewMatrixMatrices[i]=lookAt*Matrix4x4.Scale(newVector3(1.0f,1.0f,-1.0f));// Need to scale -1.0 on Z to match what is being done in the camera.wolrdToCameraMatrix API. ...
// We need to skip lighting when doing debug pass because the debug pass is done before lighting so some buffers may not be properly initialized potentially causing crashes on PS4.