From 4ec9a1408c50b79f93120a346705e3267db41122 Mon Sep 17 00:00:00 2001 From: Kleber Garcia Date: Tue, 17 Aug 2021 10:38:32 -0400 Subject: [PATCH] Fixing shader graph codegen of preview shader hybrid v2, using hybrid per instancing on properties. Removing ifdef guards for hybrid renderer v1 --- com.unity.shadergraph/CHANGELOG.md | 1 + .../Editor/Generation/Processors/PropertyCollector.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index 8760cc58d85..a0086a186f3 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -129,6 +129,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a ShaderGraph issue where hovering over a context block but not its node stack would not bring up the incorrect add menu [1351733](https://fogbugz.unity3d.com/f/cases/1351733/) - Fixed the BuiltIn Target to perform shader variant stripping [1345580] (https://issuetracker.unity3d.com/product/unity/issues/guid/1345580/) - Fixed incorrect warning while using VFXTarget +- Fixed compilation problems on preview shader when using hybrid renderer v2 and property desc override Hybrid Per Instance ## [11.0.0] - 2020-10-21 diff --git a/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs b/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs index beada39267d..aad70d65d95 100644 --- a/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs +++ b/com.unity.shadergraph/Editor/Generation/Processors/PropertyCollector.cs @@ -180,6 +180,7 @@ public void GetPropertiesDeclaration(ShaderStringBuilder builder, GenerationMode builder.AppendLine("#endif"); } builder.AppendLine("CBUFFER_END"); + builder.AppendLine("#define UNITY_ACCESS_HYBRID_INSTANCED_PROP(var, type) var"); return; }