From f082d26d388bca73d3f18330cea578f81a1449e8 Mon Sep 17 00:00:00 2001 From: Kay Chang Date: Fri, 17 Apr 2020 17:07:18 -0700 Subject: [PATCH 1/3] Fix for UniversalGraphicsTests 010_AdditionalLightsSorted: number of maximum lights different in C# and in shader code. --- com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl b/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl index 4116ac56341..898eb2e5277 100644 --- a/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl +++ b/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl @@ -7,7 +7,7 @@ #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderTypes.cs.hlsl" -#if defined(SHADER_API_MOBILE) || defined(SHADER_API_GLCORE) +#if defined(SHADER_API_MOBILE) || (defined(SHADER_API_GLCORE) && !defined(SHADER_API_SWITCH)) #define MAX_VISIBLE_LIGHTS 32 #else #define MAX_VISIBLE_LIGHTS 256 From fb0b003ad12018760f97cbb21d0798bcdd245bcf Mon Sep 17 00:00:00 2001 From: Kay Chang Date: Fri, 17 Apr 2020 17:12:47 -0700 Subject: [PATCH 2/3] Updated changelog. --- com.unity.render-pipelines.universal/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 4da84c4ee1e..4eda0cc72dd 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -168,6 +168,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed shader compilation errors when using multiple lights in DX10 level GPU. [case 1222302](https://issuetracker.unity3d.com/issues/urp-no-materials-apart-from-ui-are-rendered-when-using-direct3d11-graphics-api-on-a-dx10-gpu) - Fixed an issue with shadows not being correctly calculated in some shaders. - Fixed invalid implementation of one function in LWRP -> URP backward compatibility support. +- Fixed issue on Nintendo Switch where maximum number of visible lights in C# code did not match maximum number in shader code. ## [7.1.1] - 2019-09-05 ### Upgrade Guide From 3385980e8c015af3e2c3e9cb3edcc2dd9c146d42 Mon Sep 17 00:00:00 2001 From: Kay Chang Date: Wed, 22 Apr 2020 13:06:03 -0700 Subject: [PATCH 3/3] Added comment. --- com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl b/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl index 898eb2e5277..f2324bc6a1b 100644 --- a/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl +++ b/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl @@ -7,7 +7,7 @@ #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderTypes.cs.hlsl" -#if defined(SHADER_API_MOBILE) || (defined(SHADER_API_GLCORE) && !defined(SHADER_API_SWITCH)) +#if defined(SHADER_API_MOBILE) || (defined(SHADER_API_GLCORE) && !defined(SHADER_API_SWITCH)) // Workaround for bug on Nintendo Switch where SHADER_API_GLCORE is mistakenly defined #define MAX_VISIBLE_LIGHTS 32 #else #define MAX_VISIBLE_LIGHTS 256