Fix missing lightmap uvs calc in vertex shader

This commit is contained in:
Wojtek Figat
2021-02-16 15:55:10 +01:00
parent c902e33d8a
commit d05204cb91
3 changed files with 3 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -9,7 +9,7 @@
/// <summary>
/// Current materials shader version.
/// </summary>
#define MATERIAL_GRAPH_VERSION 147
#define MATERIAL_GRAPH_VERSION 148
class Material;
class GPUShader;