From 129d96a997d0557e89de76c8aa0322e53382dede Mon Sep 17 00:00:00 2001
From: SamGondelman <samuel@highfidelity.io>
Date: Fri, 7 Jun 2019 14:51:24 -0700
Subject: [PATCH] get rid of lightmapMap

---
 .../src/RenderableMaterialEntityItem.cpp      |  4 +--
 .../src/RenderableShapeEntityItem.cpp         |  4 +--
 libraries/entities/src/MaterialEntityItem.h   |  2 +-
 .../src/graphics-scripting/Forward.h          |  4 +--
 .../GraphicsScriptingInterface.cpp            |  8 ++---
 .../graphics-scripting/ScriptableModel.cpp    |  6 ++--
 libraries/graphics/src/graphics/Material.cpp  |  2 +-
 libraries/graphics/src/graphics/Material.h    | 14 ++++----
 .../src/graphics/MaterialTextures.slh         |  4 +--
 .../src/material-networking/MaterialCache.cpp | 20 +++++------
 .../src/material-networking/MaterialCache.h   |  2 +-
 .../render-utils/src/MeshPartPayload.cpp      |  8 ++---
 .../render-utils/src/RenderPipelines.cpp      | 36 +++++++++----------
 libraries/render/src/render/ShapePipeline.h   | 10 +++---
 14 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp b/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp
index 9a634a85ad..01eac7b203 100644
--- a/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp
+++ b/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp
@@ -257,7 +257,7 @@ ShapeKey MaterialEntityRenderer::getShapeKey() {
 
     bool isTranslucent = drawMaterialKey.isTranslucent();
     bool hasTangents = drawMaterialKey.isNormalMap();
-    bool hasLightmap = drawMaterialKey.isLightmapMap();
+    bool hasLightmap = drawMaterialKey.isLightMap();
     bool isUnlit = drawMaterialKey.isUnlit();
     
     ShapeKey::Builder builder;
@@ -270,7 +270,7 @@ ShapeKey MaterialEntityRenderer::getShapeKey() {
         builder.withTangents();
     }
     if (hasLightmap) {
-        builder.withLightmap();
+        builder.withLightMap();
     }
     if (isUnlit) {
         builder.withUnlit();
diff --git a/libraries/entities-renderer/src/RenderableShapeEntityItem.cpp b/libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
index fbc24cb4a5..7faebfdf56 100644
--- a/libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
+++ b/libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
@@ -197,7 +197,7 @@ ShapeKey ShapeEntityRenderer::getShapeKey() {
 
         bool isTranslucent = drawMaterialKey.isTranslucent();
         bool hasTangents = drawMaterialKey.isNormalMap();
-        bool hasLightmap = drawMaterialKey.isLightmapMap();
+        bool hasLightmap = drawMaterialKey.isLightMap();
         bool isUnlit = drawMaterialKey.isUnlit();
 
         ShapeKey::Builder builder;
@@ -210,7 +210,7 @@ ShapeKey ShapeEntityRenderer::getShapeKey() {
             builder.withTangents();
         }
         if (hasLightmap) {
-            builder.withLightmap();
+            builder.withLightMap();
         }
         if (isUnlit) {
             builder.withUnlit();
diff --git a/libraries/entities/src/MaterialEntityItem.h b/libraries/entities/src/MaterialEntityItem.h
index b9e83a7fe5..717ceb4ee0 100644
--- a/libraries/entities/src/MaterialEntityItem.h
+++ b/libraries/entities/src/MaterialEntityItem.h
@@ -88,7 +88,7 @@ private:
     //     emissive, albedo
     //   urls to textures:
     //     emissiveMap, albedoMap (set opacityMap = albedoMap for transparency), metallicMap or specularMap, roughnessMap or glossMap,
-    //     normalMap or bumpMap, occlusionMap, lightmapMap (broken, FIXME), scatteringMap (only works if normal mapped)
+    //     normalMap or bumpMap, occlusionMap, lightMap (broken, FIXME), scatteringMap (only works if normal mapped)
     QString _materialURL;
     // Type of material.  "uv" or "projected".
     MaterialMappingMode _materialMappingMode { UV };
diff --git a/libraries/graphics-scripting/src/graphics-scripting/Forward.h b/libraries/graphics-scripting/src/graphics-scripting/Forward.h
index 6d1b9d83d2..428c08e9f6 100644
--- a/libraries/graphics-scripting/src/graphics-scripting/Forward.h
+++ b/libraries/graphics-scripting/src/graphics-scripting/Forward.h
@@ -57,7 +57,7 @@ namespace scriptable {
      * @property {string} normalMap
      * @property {string} bumpMap
      * @property {string} occlusionMap
-     * @property {string} lightmapMap
+     * @property {string} lightMap
      * @property {string} scatteringMap
      * @property {Mat4|string} texCoordTransform0
      * @property {Mat4|string} texCoordTransform1
@@ -91,7 +91,7 @@ namespace scriptable {
         QString normalMap;
         QString bumpMap;
         QString occlusionMap;
-        QString lightmapMap;
+        QString lightMap;
         QString scatteringMap;
         std::array<glm::mat4, graphics::Material::NUM_TEXCOORD_TRANSFORMS> texCoordTransforms;
 
diff --git a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp
index eb4bfa197c..404e2d3ac6 100644
--- a/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp
+++ b/libraries/graphics-scripting/src/graphics-scripting/GraphicsScriptingInterface.cpp
@@ -430,10 +430,10 @@ namespace scriptable {
             obj.setProperty("occlusionMap", material.occlusionMap);
         }
 
-        if (hasPropertyFallthroughs && material.propertyFallthroughs.at(graphics::MaterialKey::LIGHTMAP_MAP_BIT)) {
-            obj.setProperty("lightmapMap", FALLTHROUGH);
-        } else if (!material.lightmapMap.isEmpty()) {
-            obj.setProperty("lightmapMap", material.lightmapMap);
+        if (hasPropertyFallthroughs && material.propertyFallthroughs.at(graphics::MaterialKey::LIGHT_MAP_BIT)) {
+            obj.setProperty("lightMap", FALLTHROUGH);
+        } else if (!material.lightMap.isEmpty()) {
+            obj.setProperty("lightMap", material.lightMap);
         }
 
         if (hasPropertyFallthroughs && material.propertyFallthroughs.at(graphics::MaterialKey::SCATTERING_MAP_BIT)) {
diff --git a/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.cpp b/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.cpp
index 8825a26bfe..e9cc7930ae 100644
--- a/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.cpp
+++ b/libraries/graphics-scripting/src/graphics-scripting/ScriptableModel.cpp
@@ -39,7 +39,7 @@ scriptable::ScriptableMaterial& scriptable::ScriptableMaterial::operator=(const
     normalMap = material.normalMap;
     bumpMap = material.bumpMap;
     occlusionMap = material.occlusionMap;
-    lightmapMap = material.lightmapMap;
+    lightMap = material.lightMap;
     scatteringMap = material.scatteringMap;
 
     defaultFallthrough = material.defaultFallthrough;
@@ -110,9 +110,9 @@ scriptable::ScriptableMaterial::ScriptableMaterial(const graphics::MaterialPoint
             occlusionMap = map->getTextureSource()->getUrl().toString();
         }
 
-        map = material->getTextureMap(graphics::Material::MapChannel::LIGHTMAP_MAP);
+        map = material->getTextureMap(graphics::Material::MapChannel::LIGHT_MAP);
         if (map && map->getTextureSource()) {
-            lightmapMap = map->getTextureSource()->getUrl().toString();
+            lightMap = map->getTextureSource()->getUrl().toString();
         }
 
         map = material->getTextureMap(graphics::Material::MapChannel::SCATTERING_MAP);
diff --git a/libraries/graphics/src/graphics/Material.cpp b/libraries/graphics/src/graphics/Material.cpp
index 3ef407b7d9..6be8ec5f68 100755
--- a/libraries/graphics/src/graphics/Material.cpp
+++ b/libraries/graphics/src/graphics/Material.cpp
@@ -129,7 +129,7 @@ void Material::setTextureMap(MapChannel channel, const TextureMapPointer& textur
         _texcoordTransforms[1] = (textureMap ? textureMap->getTextureTransform().getMatrix() : glm::mat4());
     }
 
-    if (channel == MaterialKey::LIGHTMAP_MAP) {
+    if (channel == MaterialKey::LIGHT_MAP) {
         // update the texcoord1 with lightmap
         _texcoordTransforms[1] = (textureMap ? textureMap->getTextureTransform().getMatrix() : glm::mat4());
         _lightmapParams = (textureMap ? glm::vec2(textureMap->getLightmapOffsetScale()) : glm::vec2(0.0, 1.0));
diff --git a/libraries/graphics/src/graphics/Material.h b/libraries/graphics/src/graphics/Material.h
index 330feaa61c..25601c5743 100755
--- a/libraries/graphics/src/graphics/Material.h
+++ b/libraries/graphics/src/graphics/Material.h
@@ -53,7 +53,7 @@ public:
         ROUGHNESS_MAP_BIT,
         NORMAL_MAP_BIT,
         OCCLUSION_MAP_BIT,
-        LIGHTMAP_MAP_BIT,
+        LIGHT_MAP_BIT,
         SCATTERING_MAP_BIT,
 
         NUM_FLAGS,
@@ -67,7 +67,7 @@ public:
         ROUGHNESS_MAP,
         NORMAL_MAP,
         OCCLUSION_MAP,
-        LIGHTMAP_MAP,
+        LIGHT_MAP,
         SCATTERING_MAP,
 
         NUM_MAP_CHANNELS,
@@ -107,7 +107,7 @@ public:
 
         Builder& withNormalMap() { _flags.set(NORMAL_MAP_BIT); return (*this); }
         Builder& withOcclusionMap() { _flags.set(OCCLUSION_MAP_BIT); return (*this); }
-        Builder& withLightmapMap() { _flags.set(LIGHTMAP_MAP_BIT); return (*this); }
+        Builder& withLightMap() { _flags.set(LIGHT_MAP_BIT); return (*this); }
         Builder& withScatteringMap() { _flags.set(SCATTERING_MAP_BIT); return (*this); }
 
         // Convenient standard keys that we will keep on using all over the place
@@ -157,8 +157,8 @@ public:
     void setOcclusionMap(bool value) { _flags.set(OCCLUSION_MAP_BIT, value); }
     bool isOcclusionMap() const { return _flags[OCCLUSION_MAP_BIT]; }
 
-    void setLightmapMap(bool value) { _flags.set(LIGHTMAP_MAP_BIT, value); }
-    bool isLightmapMap() const { return _flags[LIGHTMAP_MAP_BIT]; }
+    void setLightMap(bool value) { _flags.set(LIGHT_MAP_BIT, value); }
+    bool isLightMap() const { return _flags[LIGHT_MAP_BIT]; }
 
     void setScattering(bool value) { _flags.set(SCATTERING_VAL_BIT, value); }
     bool isScattering() const { return _flags[SCATTERING_VAL_BIT]; }
@@ -235,8 +235,8 @@ public:
         Builder& withoutOcclusionMap()       { _value.reset(MaterialKey::OCCLUSION_MAP_BIT); _mask.set(MaterialKey::OCCLUSION_MAP_BIT); return (*this); }
         Builder& withOcclusionMap()        { _value.set(MaterialKey::OCCLUSION_MAP_BIT);  _mask.set(MaterialKey::OCCLUSION_MAP_BIT); return (*this); }
 
-        Builder& withoutLightmapMap()       { _value.reset(MaterialKey::LIGHTMAP_MAP_BIT); _mask.set(MaterialKey::LIGHTMAP_MAP_BIT); return (*this); }
-        Builder& withLightmapMap()        { _value.set(MaterialKey::LIGHTMAP_MAP_BIT);  _mask.set(MaterialKey::LIGHTMAP_MAP_BIT); return (*this); }
+        Builder& withoutLightMap()       { _value.reset(MaterialKey::LIGHT_MAP_BIT); _mask.set(MaterialKey::LIGHT_MAP_BIT); return (*this); }
+        Builder& withLightMap()        { _value.set(MaterialKey::LIGHT_MAP_BIT);  _mask.set(MaterialKey::LIGHT_MAP_BIT); return (*this); }
 
         Builder& withoutScattering()       { _value.reset(MaterialKey::SCATTERING_VAL_BIT); _mask.set(MaterialKey::SCATTERING_VAL_BIT); return (*this); }
         Builder& withScattering()        { _value.set(MaterialKey::SCATTERING_VAL_BIT);  _mask.set(MaterialKey::SCATTERING_VAL_BIT); return (*this); }
diff --git a/libraries/graphics/src/graphics/MaterialTextures.slh b/libraries/graphics/src/graphics/MaterialTextures.slh
index 92e76e5736..bf0416c7bf 100644
--- a/libraries/graphics/src/graphics/MaterialTextures.slh
+++ b/libraries/graphics/src/graphics/MaterialTextures.slh
@@ -178,7 +178,7 @@ float fetchScatteringMap(vec2 uv) {
     float <$occlusion$> = mix(1.0, fetchOcclusionMap(<$texcoord1$>), float((<$matKey$> & OCCLUSION_MAP_BIT) != 0));
 <@endif@>
 <@if lightmap@>
-    vec3 <$lightmap$> = fetchLightmapMap(<$texcoord1$>);
+    vec3 <$lightmap$> = fetchLightMap(<$texcoord1$>);
 <@endif@>
 <@endfunc@>
 
@@ -189,7 +189,7 @@ float fetchScatteringMap(vec2 uv) {
 <$declareMaterialTexMapArrayBuffer()$>
 
 LAYOUT(binding=GRAPHICS_TEXTURE_MATERIAL_EMISSIVE_LIGHTMAP) uniform sampler2D emissiveMap;
-vec3 fetchLightmapMap(vec2 uv) {
+vec3 fetchLightMap(vec2 uv) {
     vec2 lightmapParams = getTexMapArray()._lightmapParams;
     return (vec3(lightmapParams.x) + lightmapParams.y * texture(emissiveMap, uv).rgb);
 }
diff --git a/libraries/material-networking/src/material-networking/MaterialCache.cpp b/libraries/material-networking/src/material-networking/MaterialCache.cpp
index 745504fb3d..5e86ea506a 100644
--- a/libraries/material-networking/src/material-networking/MaterialCache.cpp
+++ b/libraries/material-networking/src/material-networking/MaterialCache.cpp
@@ -362,9 +362,9 @@ std::pair<std::string, std::shared_ptr<NetworkMaterial>> NetworkMaterialResource
                 if (value.isString()) {
                     auto valueString = value.toString();
                     if (valueString == FALLTHROUGH) {
-                        material->setPropertyDoesFallthrough(graphics::MaterialKey::FlagBit::LIGHTMAP_MAP_BIT);
+                        material->setPropertyDoesFallthrough(graphics::MaterialKey::FlagBit::LIGHT_MAP_BIT);
                     } else {
-                        material->setLightmapMap(baseUrl.resolved(valueString));
+                        material->setLightMap(baseUrl.resolved(valueString));
                     }
                 }
             } else if (key == "texCoordTransform0") {
@@ -567,12 +567,12 @@ void NetworkMaterial::setScatteringMap(const QUrl& url) {
     }
 }
 
-void NetworkMaterial::setLightmapMap(const QUrl& url) {
-    auto map = fetchTextureMap(url, image::TextureUsage::LIGHTMAP_TEXTURE, MapChannel::LIGHTMAP_MAP);
+void NetworkMaterial::setLightMap(const QUrl& url) {
+    auto map = fetchTextureMap(url, image::TextureUsage::LIGHTMAP_TEXTURE, MapChannel::LIGHT_MAP);
     if (map) {
         //map->setTextureTransform(_lightmapTransform);
         //map->setLightmapOffsetScale(_lightmapParams.x, _lightmapParams.y);
-        setTextureMap(MapChannel::LIGHTMAP_MAP, map);
+        setTextureMap(MapChannel::LIGHT_MAP, map);
     }
 }
 
@@ -640,14 +640,14 @@ NetworkMaterial::NetworkMaterial(const HFMMaterial& material, const QUrl& textur
     }
 
     if (!material.lightmapTexture.filename.isEmpty()) {
-        auto map = fetchTextureMap(textureBaseUrl, material.lightmapTexture, image::TextureUsage::LIGHTMAP_TEXTURE, MapChannel::LIGHTMAP_MAP);
+        auto map = fetchTextureMap(textureBaseUrl, material.lightmapTexture, image::TextureUsage::LIGHTMAP_TEXTURE, MapChannel::LIGHT_MAP);
         if (map) {
             _lightmapTransform = material.lightmapTexture.transform;
             _lightmapParams = material.lightmapParams;
             map->setTextureTransform(_lightmapTransform);
             map->setLightmapOffsetScale(_lightmapParams.x, _lightmapParams.y);
         }
-        setTextureMap(MapChannel::LIGHTMAP_MAP, map);
+        setTextureMap(MapChannel::LIGHT_MAP, map);
     }
 }
 
@@ -660,7 +660,7 @@ void NetworkMaterial::setTextures(const QVariantMap& textureMap) {
     const auto& metallicName = getTextureName(MapChannel::METALLIC_MAP);
     const auto& occlusionName = getTextureName(MapChannel::OCCLUSION_MAP);
     const auto& emissiveName = getTextureName(MapChannel::EMISSIVE_MAP);
-    const auto& lightmapName = getTextureName(MapChannel::LIGHTMAP_MAP);
+    const auto& lightmapName = getTextureName(MapChannel::LIGHT_MAP);
     const auto& scatteringName = getTextureName(MapChannel::SCATTERING_MAP);
 
     if (!albedoName.isEmpty()) {
@@ -715,12 +715,12 @@ void NetworkMaterial::setTextures(const QVariantMap& textureMap) {
 
     if (!lightmapName.isEmpty()) {
         auto url = textureMap.contains(lightmapName) ? textureMap[lightmapName].toUrl() : QUrl();
-        auto map = fetchTextureMap(url, image::TextureUsage::LIGHTMAP_TEXTURE, MapChannel::LIGHTMAP_MAP);
+        auto map = fetchTextureMap(url, image::TextureUsage::LIGHTMAP_TEXTURE, MapChannel::LIGHT_MAP);
         if (map) {
             map->setTextureTransform(_lightmapTransform);
             map->setLightmapOffsetScale(_lightmapParams.x, _lightmapParams.y);
         }
-        setTextureMap(MapChannel::LIGHTMAP_MAP, map);
+        setTextureMap(MapChannel::LIGHT_MAP, map);
     }
 }
 
diff --git a/libraries/material-networking/src/material-networking/MaterialCache.h b/libraries/material-networking/src/material-networking/MaterialCache.h
index 7ed0453187..66e6b8250b 100644
--- a/libraries/material-networking/src/material-networking/MaterialCache.h
+++ b/libraries/material-networking/src/material-networking/MaterialCache.h
@@ -31,7 +31,7 @@ public:
     void setOcclusionMap(const QUrl& url);
     void setEmissiveMap(const QUrl& url);
     void setScatteringMap(const QUrl& url);
-    void setLightmapMap(const QUrl& url);
+    void setLightMap(const QUrl& url);
 
     bool isMissingTexture();
     void checkResetOpacityMap();
diff --git a/libraries/render-utils/src/MeshPartPayload.cpp b/libraries/render-utils/src/MeshPartPayload.cpp
index cb3aa76468..1a6e5dbadc 100644
--- a/libraries/render-utils/src/MeshPartPayload.cpp
+++ b/libraries/render-utils/src/MeshPartPayload.cpp
@@ -115,8 +115,8 @@ ShapeKey MeshPartPayload::getShapeKey() const {
     if (drawMaterialKey.isNormalMap()) {
         builder.withTangents();
     }
-    if (drawMaterialKey.isLightmapMap()) {
-        builder.withLightmap();
+    if (drawMaterialKey.isLightMap()) {
+        builder.withLightMap();
     }
     return builder.build();
 }
@@ -354,7 +354,7 @@ void ModelMeshPartPayload::setShapeKey(bool invalidateShapeKey, PrimitiveMode pr
 
     bool isTranslucent = drawMaterialKey.isTranslucent();
     bool hasTangents = drawMaterialKey.isNormalMap() && _hasTangents;
-    bool hasLightmap = drawMaterialKey.isLightmapMap();
+    bool hasLightmap = drawMaterialKey.isLightMap();
     bool isUnlit = drawMaterialKey.isUnlit();
 
     bool isDeformed = _isBlendShaped || _isSkinned;
@@ -374,7 +374,7 @@ void ModelMeshPartPayload::setShapeKey(bool invalidateShapeKey, PrimitiveMode pr
         builder.withTangents();
     }
     if (hasLightmap) {
-        builder.withLightmap();
+        builder.withLightMap();
     }
     if (isUnlit) {
         builder.withUnlit();
diff --git a/libraries/render-utils/src/RenderPipelines.cpp b/libraries/render-utils/src/RenderPipelines.cpp
index 2817abb4a1..69a76cce00 100644
--- a/libraries/render-utils/src/RenderPipelines.cpp
+++ b/libraries/render-utils/src/RenderPipelines.cpp
@@ -107,7 +107,7 @@ void initDeferredPipelines(render::ShapePlumber& plumber, const render::ShapePip
         model_translucent_normal_map, nullptr, nullptr);
     addPipeline(
         // FIXME: Ignore lightmap for translucents meshpart
-        Key::Builder().withMaterial().withTranslucent().withLightmap(),
+        Key::Builder().withMaterial().withTranslucent().withLightMap(),
         model_translucent, nullptr, nullptr);
     // Same thing but with Fade on
     addPipeline(
@@ -127,21 +127,21 @@ void initDeferredPipelines(render::ShapePlumber& plumber, const render::ShapePip
         model_translucent_normal_map_fade, batchSetter, itemSetter);
     addPipeline(
         // FIXME: Ignore lightmap for translucents meshpart
-        Key::Builder().withMaterial().withTranslucent().withLightmap().withFade(),
+        Key::Builder().withMaterial().withTranslucent().withLightMap().withFade(),
         model_translucent_fade, batchSetter, itemSetter);
     // Lightmapped
     addPipeline(
-        Key::Builder().withMaterial().withLightmap(),
+        Key::Builder().withMaterial().withLightMap(),
         model_lightmap, nullptr, nullptr);
     addPipeline(
-        Key::Builder().withMaterial().withLightmap().withTangents(),
+        Key::Builder().withMaterial().withLightMap().withTangents(),
         model_lightmap_normal_map, nullptr, nullptr);
     // Same thing but with Fade on
     addPipeline(
-        Key::Builder().withMaterial().withLightmap().withFade(),
+        Key::Builder().withMaterial().withLightMap().withFade(),
         model_lightmap_fade, batchSetter, itemSetter);
     addPipeline(
-        Key::Builder().withMaterial().withLightmap().withTangents().withFade(),
+        Key::Builder().withMaterial().withLightMap().withTangents().withFade(),
         model_lightmap_normal_map_fade, batchSetter, itemSetter);
 
     // matrix palette skinned
@@ -228,10 +228,10 @@ void initForwardPipelines(ShapePlumber& plumber) {
 
     // Opaques
     addPipeline(Key::Builder().withMaterial(), program::forward_model);
-    addPipeline(Key::Builder().withMaterial().withLightmap(), program::forward_model_lightmap);
+    addPipeline(Key::Builder().withMaterial().withLightMap(), program::forward_model_lightmap);
     addPipeline(Key::Builder().withMaterial().withUnlit(), program::forward_model_unlit);
     addPipeline(Key::Builder().withMaterial().withTangents(), program::forward_model_normal_map);
-    addPipeline(Key::Builder().withMaterial().withTangents().withLightmap(), program::forward_model_normal_map_lightmap);
+    addPipeline(Key::Builder().withMaterial().withTangents().withLightMap(), program::forward_model_normal_map_lightmap);
 
     // Deformed Opaques
     addPipeline(Key::Builder().withMaterial().withDeformed(), program::forward_deformed_model);
@@ -581,7 +581,7 @@ void RenderPipelines::updateMultiMaterial(graphics::MultiMaterial& multiMaterial
                     break;
                 case graphics::MaterialKey::EMISSIVE_MAP_BIT:
                     // Lightmap takes precendence over emissive map for legacy reasons
-                    if (materialKey.isEmissiveMap() && !materialKey.isLightmapMap()) {
+                    if (materialKey.isEmissiveMap() && !materialKey.isLightMap()) {
                         auto itr = textureMaps.find(graphics::MaterialKey::EMISSIVE_MAP);
                         if (itr != textureMaps.end()) {
                             if (itr->second->isDefined()) {
@@ -595,14 +595,14 @@ void RenderPipelines::updateMultiMaterial(graphics::MultiMaterial& multiMaterial
                             forceDefault = true;
                         }
                         schemaKey.setEmissiveMap(true);
-                    } else if (materialKey.isLightmapMap()) {
+                    } else if (materialKey.isLightMap()) {
                         // We'll set this later when we check the lightmap
                         wasSet = true;
                     }
                     break;
-                case graphics::MaterialKey::LIGHTMAP_MAP_BIT:
-                    if (materialKey.isLightmapMap()) {
-                        auto itr = textureMaps.find(graphics::MaterialKey::LIGHTMAP_MAP);
+                case graphics::MaterialKey::LIGHT_MAP_BIT:
+                    if (materialKey.isLightMap()) {
+                        auto itr = textureMaps.find(graphics::MaterialKey::LIGHT_MAP);
                         if (itr != textureMaps.end()) {
                             if (itr->second->isDefined()) {
                                 drawMaterialTextures->setTexture(gr::Texture::MaterialEmissiveLightmap, itr->second->getTextureView());
@@ -614,7 +614,7 @@ void RenderPipelines::updateMultiMaterial(graphics::MultiMaterial& multiMaterial
                         } else {
                             forceDefault = true;
                         }
-                        schemaKey.setLightmapMap(true);
+                        schemaKey.setLightMap(true);
                     }
                     break;
                 case graphics::Material::TEXCOORDTRANSFORM0:
@@ -712,12 +712,12 @@ void RenderPipelines::updateMultiMaterial(graphics::MultiMaterial& multiMaterial
                 }
                 break;
             case graphics::MaterialKey::EMISSIVE_MAP_BIT:
-                if (schemaKey.isEmissiveMap() && !schemaKey.isLightmapMap()) {
+                if (schemaKey.isEmissiveMap() && !schemaKey.isLightMap()) {
                     drawMaterialTextures->setTexture(gr::Texture::MaterialEmissiveLightmap, textureCache->getGrayTexture());
                 }
                 break;
-            case graphics::MaterialKey::LIGHTMAP_MAP_BIT:
-                if (schemaKey.isLightmapMap()) {
+            case graphics::MaterialKey::LIGHT_MAP_BIT:
+                if (schemaKey.isLightMap()) {
                     drawMaterialTextures->setTexture(gr::Texture::MaterialEmissiveLightmap, textureCache->getBlackTexture());
                 }
                 break;
@@ -765,7 +765,7 @@ bool RenderPipelines::bindMaterials(graphics::MultiMaterial& multiMaterial, gpu:
             batch.setResourceTextureTable(multiMaterial.getTextureTable());
         } else {
             if (renderMode != render::Args::RenderMode::SHADOW_RENDER_MODE) {
-                if (key.isLightmapMap()) {
+                if (key.isLightMap()) {
                     defaultMaterialTextures->setTexture(gr::Texture::MaterialEmissiveLightmap, textureCache->getBlackTexture());
                 } else if (key.isEmissiveMap()) {
                     defaultMaterialTextures->setTexture(gr::Texture::MaterialEmissiveLightmap, textureCache->getGrayTexture());
diff --git a/libraries/render/src/render/ShapePipeline.h b/libraries/render/src/render/ShapePipeline.h
index 159d2ba6f3..ad91ea61ef 100644
--- a/libraries/render/src/render/ShapePipeline.h
+++ b/libraries/render/src/render/ShapePipeline.h
@@ -74,7 +74,7 @@ public:
 
         Builder& withMaterial() { _flags.set(MATERIAL); return (*this); }
         Builder& withTranslucent() { _flags.set(TRANSLUCENT); return (*this); }
-        Builder& withLightmap() { _flags.set(LIGHTMAP); return (*this); }
+        Builder& withLightMap() { _flags.set(LIGHTMAP); return (*this); }
         Builder& withTangents() { _flags.set(TANGENTS); return (*this); }
         Builder& withUnlit() { _flags.set(UNLIT); return (*this); }
         Builder& withDeformed() { _flags.set(DEFORMED); return (*this); }
@@ -116,8 +116,8 @@ public:
             Builder& withTranslucent() { _flags.set(TRANSLUCENT); _mask.set(TRANSLUCENT); return (*this); }
             Builder& withOpaque() { _flags.reset(TRANSLUCENT); _mask.set(TRANSLUCENT); return (*this); }
 
-            Builder& withLightmap() { _flags.set(LIGHTMAP); _mask.set(LIGHTMAP); return (*this); }
-            Builder& withoutLightmap() { _flags.reset(LIGHTMAP); _mask.set(LIGHTMAP); return (*this); }
+            Builder& withLightMap() { _flags.set(LIGHTMAP); _mask.set(LIGHTMAP); return (*this); }
+            Builder& withoutLightMap() { _flags.reset(LIGHTMAP); _mask.set(LIGHTMAP); return (*this); }
 
             Builder& withTangents() { _flags.set(TANGENTS); _mask.set(TANGENTS); return (*this); }
             Builder& withoutTangents() { _flags.reset(TANGENTS); _mask.set(TANGENTS); return (*this); }
@@ -160,7 +160,7 @@ public:
     };
 
     bool useMaterial() const { return _flags[MATERIAL]; }
-    bool hasLightmap() const { return _flags[LIGHTMAP]; }
+    bool hasLightMap() const { return _flags[LIGHTMAP]; }
     bool hasTangents() const { return _flags[TANGENTS]; }
     bool isUnlit() const { return _flags[UNLIT]; }
     bool isTranslucent() const { return _flags[TRANSLUCENT]; }
@@ -199,7 +199,7 @@ inline QDebug operator<<(QDebug debug, const ShapeKey& key) {
         } else {
             debug << "[ShapeKey:"
                 << "useMaterial:" << key.useMaterial()
-                << "hasLightmap:" << key.hasLightmap()
+                << "hasLightmap:" << key.hasLightMap()
                 << "hasTangents:" << key.hasTangents()
                 << "isUnlit:" << key.isUnlit()
                 << "isTranslucent:" << key.isTranslucent()