CHANGE: Move Input System test scenes and samples to URP#2397
Open
Pauliusd01 wants to merge 19 commits intodevelopfrom
Open
CHANGE: Move Input System test scenes and samples to URP#2397Pauliusd01 wants to merge 19 commits intodevelopfrom
Pauliusd01 wants to merge 19 commits intodevelopfrom
Conversation
Migrate materials and scene/prefab references to new URP shader assets: updated many .mat files to point to the new shader GUID/fileID and replaced placeholder material references in numerous scenes and prefabs (MeshRenderer/ParticleSystemRenderer entries). Added URP assets and global settings under Assets/Settings (URP-PipelineAsset, URP-Renderer, UniversalRenderPipelineGlobalSettings) and new shader sources (SamplesSimpleLit and other sample shaders). Also updated Packages/manifest.json and ProjectSettings (GraphicsSettings, QualitySettings) and added ShaderGraph/URP project settings to enable the URP configuration across the project and external sample projects.
Add a SimpleLit shader and Default.mat assets (with .meta) across multiple sample folders (InGameHints, ProjectWideActions, RebindingUI, SimpleDemo, SimpleMultiplayer, UIvsGameInput, UnityRemote). Update sample scenes and prefabs to reference the new Default material GUIDs and adjust RebindingUI game materials to use the new shader GUID. This provides a shared lightweight PBR shader and default materials for the sample content.
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2397 +/- ##
===========================================
+ Coverage 77.92% 78.09% +0.16%
===========================================
Files 482 483 +1
Lines 97755 98760 +1005
===========================================
+ Hits 76175 77125 +950
- Misses 21580 21635 +55 Flags with carried forward coverage won't be shown. Click here to find out more. |
Add support for punctual light shadows across sample SimpleLit shaders and improve capture shader blending. - Created Assets/Samples/InGameHints/SimpleLit.shader (full URP+fallback implementation). - For multiple Sample SimpleLit shaders (various sample folders and ExternalSampleProjects): added #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW, introduced float3 _LightPosition, and compute lightDir conditionally (use _LightPosition for punctual lights, otherwise _LightDirection) before ApplyShadowBias. Also adjusted shader names to include sample subfolder paths. - Updated ExternalSampleProjects/InputDeviceTester/WorldCoord Diffuse.shader: added screen shadow and soft shadow multi_compile flags, normalized blend weights for axis-based texturing, use TransformWorldToShadowCoord to get shadowCoord for GetMainLight, and factor in distanceAttenuation and shadowAttenuation into diffuse lighting. - Refactored ExternalSampleProjects/TouchSamples Capture.shader: added properties for _SrcBlend, _DstBlend and _Premultiplied, made Blend use those properties, added local shader_feature for _PREMULTIPLIED_ON, consolidated URP/premultiplied variants, unified built-in fallback paths, and updated fragment logic to correctly handle premultiplied vs non-premultiplied output. These changes improve shadow correctness for punctual lights and add flexible, correct blending modes for capture/predicated premultiplied alpha handling.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
5 tasks
Add _MAIN_LIGHT_SHADOWS_SCREEN and _SHADOWS_SOFT multi_compile pragmas to various SimpleLit sample shaders and set inputData.shadowCoord = TransformWorldToShadowCoord(...) so shaders can use screen and soft shadow paths. Also enable the Render Graph in the URP pipeline asset (m_EnableRenderGraph: 1). Affects multiple sample and external sample SimpleLit shaders and the URP pipeline asset.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Update sample .sample.json descriptions to indicate the Universal Render Pipeline (URP) package is required for shader compilation. Add URP_COMPATIBILITY_MODE to Standalone scripting define symbols in ProjectSettings so code can conditionally enable URP compatibility.
This reverts commit 978fa3e.
Add the URP_COMPATIBILITY_MODE scripting define symbol to PlayerSettings across projects. Updates ProjectSettings.asset in the root project and ExternalSampleProjects (InputDeviceTester and TouchSamples) to set scriptingDefineSymbols for Android, iPhone, and tvOS, and ensure Standalone retains URP_COMPATIBILITY_MODE (preserving existing UNITY_ENABLE_STEAM_CONTROLLER_SUPPORT for Standalone). This enables URP compatibility mode across those platforms and sample projects.
Collaborator
Author
|
@u-pr Can you confirm that previous feedback has been addressed? And that there isn't any other issues? |
Contributor
|
I have reviewed the latest changes against the previous feedback. While most issues have been successfully addressed, there are a few items that still require attention. ✅ Addressed
❌ Not Addressed
ℹ️ Other Considerations
🤖 Helpful? 👍/👎 |
| @@ -25,9 +172,9 @@ struct Input { | |||
| }; | |||
Contributor
There was a problem hiding this comment.
The Input struct still lacks the worldPos and worldNormal fields required by the surf function below.
struct Input {
float2 uv_MainTex;
float3 worldPos;
float3 worldNormal;
};🤖 Helpful? 👍/👎
...lSampleProjects/InputDeviceTester/Assets/InputDeviceTester/Shaders/WorldCoord Diffuse.shader
Show resolved
Hide resolved
Adjust URP PipelineAsset flags: disable HDR, terrain holes, LOD cross-fade, light cookies, adaptive performance and data-driven lens flare; enable a set of prefiltering/SSAO/DBuffer/soft-shadow and native render-pass related flags and debug/write rendering layer keywords. These changes modify rendering feature toggles and preprocessing options in Assets/Settings/URP-PipelineAsset.asset and will affect visual quality and rendering behavior (e.g. HDR and certain lighting features turned off, while various prefilter/SSAO and render-pass features are turned on). Verify rendering and performance across target platforms after applying.
Add an editor script (Assets/Editor/AmbientProbeSetup.cs) that triggers DynamicGI.UpdateEnvironment on editor load and whenever a scene is opened. Uses [InitializeOnLoad] to subscribe to EditorSceneManager.sceneOpened and schedules an initial update via EditorApplication.delayCall so ambient probes / GI environment are refreshed after scene load.
This reverts commit c5b6223.
Set project color space to Linear and enable linear light intensity for correct PBR lighting. Updated ProjectSettings/ProjectSettings.asset (m_ActiveColorSpace -> 1) and ProjectSettings/GraphicsSettings.asset (m_LightsUseLinearIntensity -> 1) to ensure consistent, physically based lighting behavior.
Linear color space on Android requires OpenGL ES 3.0+ or Vulkan
josepmariapujol-unity
approved these changes
Mar 27, 2026
Collaborator
|
Manually tested, works good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Previous approach was to use shadergraph shaders to try and support all 3 pipelines which proved to be very difficult across different editor and package versions. This time I'm dropping the HDRP support and using URP shaders with Built in renderpipeline fallbacks. This does mean that our project will move to use URP by default
Testing status & QA
Samples
QA
TouchSamples
InputDeviceTester
Overall Product Risks
Comments to reviewers
N/A
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.