diff --git a/Content/Editor/MaterialTemplates/Features/Lightmap.hlsl b/Content/Editor/MaterialTemplates/Features/Lightmap.hlsl index 33ef567ca..f4583fa7f 100644 --- a/Content/Editor/MaterialTemplates/Features/Lightmap.hlsl +++ b/Content/Editor/MaterialTemplates/Features/Lightmap.hlsl @@ -1,6 +1,7 @@ // Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. @0// Lightmap: Defines +#define CAN_USE_LIGHTMAP 1 @1// Lightmap: Includes @2// Lightmap: Constants float4 LightmapArea; diff --git a/Content/Editor/MaterialTemplates/Surface.shader b/Content/Editor/MaterialTemplates/Surface.shader index 1038a73a3..4eee27691 100644 --- a/Content/Editor/MaterialTemplates/Surface.shader +++ b/Content/Editor/MaterialTemplates/Surface.shader @@ -350,7 +350,7 @@ VertexOutput VS(ModelInput input) output.Geometry.LightmapUV = input.LightmapUV * input.InstanceLightmapArea.zw + input.InstanceLightmapArea.xy; output.Geometry.InstanceParams = float2(input.InstanceOrigin.w, input.InstanceTransform1.w); #else -#if USE_LIGHTMAP +#if CAN_USE_LIGHTMAP output.Geometry.LightmapUV = input.LightmapUV * LightmapArea.zw + LightmapArea.xy; #else output.Geometry.LightmapUV = input.LightmapUV; diff --git a/Source/Engine/Graphics/Materials/MaterialShader.h b/Source/Engine/Graphics/Materials/MaterialShader.h index 102ac4d41..8c49389a7 100644 --- a/Source/Engine/Graphics/Materials/MaterialShader.h +++ b/Source/Engine/Graphics/Materials/MaterialShader.h @@ -9,7 +9,7 @@ /// /// Current materials shader version. /// -#define MATERIAL_GRAPH_VERSION 147 +#define MATERIAL_GRAPH_VERSION 148 class Material; class GPUShader;