Refactored, renaming "shadow map" to "light map" to avoid confusion with the shadow volume maps

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4036
This commit is contained in:
kearwood
2012-04-12 06:25:44 +00:00
parent ff9bd874d3
commit 35df6c2ec5
14 changed files with 38 additions and 40 deletions

View File

@@ -45,7 +45,7 @@ KRCamera::KRCamera() {
bEnableAmbient = true; bEnableAmbient = true;
bEnableDiffuse = true; bEnableDiffuse = true;
bEnableSpecular = true; bEnableSpecular = true;
bEnableShadowMap = true; bEnableLightMap = true;
bDebugSuperShiny = false; bDebugSuperShiny = false;

View File

@@ -47,7 +47,7 @@ public:
bool bEnableDiffuseMap; bool bEnableDiffuseMap;
bool bEnableNormalMap; bool bEnableNormalMap;
bool bEnableSpecMap; bool bEnableSpecMap;
bool bEnableShadowMap; bool bEnableLightMap;
bool bDebugPSSM; bool bDebugPSSM;
bool bDebugSuperShiny; bool bDebugSuperShiny;
bool bShowShadowBuffer; bool bShowShadowBuffer;

View File

@@ -310,7 +310,7 @@ double const PI = 3.141592653589793f;
glUniformMatrix4fv(m_shadowUniforms[KRENGINE_UNIFORM_SHADOWMVP1], 1, GL_FALSE, shadowmvpmatrix[iShadow].getPointer()); glUniformMatrix4fv(m_shadowUniforms[KRENGINE_UNIFORM_SHADOWMVP1], 1, GL_FALSE, shadowmvpmatrix[iShadow].getPointer());
// Calculate the bounding volume of the shadow map // Calculate the bounding volume of the light map
KRMat4 matInvShadow = shadowmvpmatrix[iShadow]; KRMat4 matInvShadow = shadowmvpmatrix[iShadow];
matInvShadow.invert(); matInvShadow.invert();
@@ -804,7 +804,7 @@ double const PI = 3.141592653589793f;
@"enable_diffuse_map", @"enable_diffuse_map",
@"enable_normal_map", @"enable_normal_map",
@"enable_spec_map", @"enable_spec_map",
@"enable_shadow_map", @"enable_light_map",
@"ambient_r", @"ambient_r",
@"ambient_g", @"ambient_g",
@"ambient_b", @"ambient_b",
@@ -841,7 +841,7 @@ double const PI = 3.141592653589793f;
@"Enable diffuse map", @"Enable diffuse map",
@"Enable normal map", @"Enable normal map",
@"Enable specular map", @"Enable specular map",
@"Enable shadow map", @"Enable light map",
@"Ambient light red intensity", @"Ambient light red intensity",
@"Ambient light green intensity", @"Ambient light green intensity",
@"Ambient light blue intensity", @"Ambient light blue intensity",
@@ -915,7 +915,7 @@ double const PI = 3.141592653589793f;
m_camera.bEnableDiffuseMap ? 1.0f : 0.0f, m_camera.bEnableDiffuseMap ? 1.0f : 0.0f,
m_camera.bEnableNormalMap ? 1.0f : 0.0f, m_camera.bEnableNormalMap ? 1.0f : 0.0f,
m_camera.bEnableSpecMap ? 1.0f : 0.0f, m_camera.bEnableSpecMap ? 1.0f : 0.0f,
m_camera.bEnableShadowMap ? 1.0f : 0.0f, m_camera.bEnableLightMap ? 1.0f : 0.0f,
m_camera.dAmbientR, m_camera.dAmbientR,
m_camera.dAmbientG, m_camera.dAmbientG,
m_camera.dAmbientB, m_camera.dAmbientB,
@@ -977,7 +977,7 @@ double const PI = 3.141592653589793f;
m_camera.bEnableSpecMap = bNewBoolVal; m_camera.bEnableSpecMap = bNewBoolVal;
break; break;
case 8: case 8:
m_camera.bEnableShadowMap = bNewBoolVal; m_camera.bEnableLightMap = bNewBoolVal;
break; break;
case 9: case 9:
m_camera.dAmbientR = v; m_camera.dAmbientR = v;

View File

@@ -33,10 +33,10 @@
#import "KRInstance.h" #import "KRInstance.h"
#include <assert.h> #include <assert.h>
KRInstance::KRInstance(std::string instance_name, std::string model_name, const KRMat4 modelMatrix, std::string shadow_map) : KRNode(instance_name) { KRInstance::KRInstance(std::string instance_name, std::string model_name, const KRMat4 modelMatrix, std::string light_map) : KRNode(instance_name) {
m_modelMatrix = modelMatrix; m_modelMatrix = modelMatrix;
m_shadowMap = shadow_map; m_lightMap = light_map;
m_pShadowMap = NULL; m_pLightMap = NULL;
m_pModel = NULL; m_pModel = NULL;
m_model_name = model_name; m_model_name = model_name;
} }
@@ -53,7 +53,7 @@ tinyxml2::XMLElement *KRInstance::saveXML( tinyxml2::XMLNode *parent)
{ {
tinyxml2::XMLElement *e = KRNode::saveXML(parent); tinyxml2::XMLElement *e = KRNode::saveXML(parent);
e->SetAttribute("mesh_name", m_model_name.c_str()); e->SetAttribute("mesh_name", m_model_name.c_str());
e->SetAttribute("light_map", m_shadowMap.c_str()); e->SetAttribute("light_map", m_lightMap.c_str());
return e; return e;
} }
@@ -72,12 +72,12 @@ void KRInstance::render(KRCamera *pCamera, KRModelManager *pModelManager, KRBoun
if(m_pModel != NULL && (getExtents(pModelManager).test_intersect(frustrumVolume) || bRenderShadowMap)) { if(m_pModel != NULL && (getExtents(pModelManager).test_intersect(frustrumVolume) || bRenderShadowMap)) {
if(m_pShadowMap == NULL && m_shadowMap.size()) { if(m_pLightMap == NULL && m_lightMap.size()) {
m_pShadowMap = pTextureManager->getTexture(m_shadowMap.c_str()); m_pLightMap = pTextureManager->getTexture(m_lightMap.c_str());
} }
if(cShadowBuffers == 0 && m_pShadowMap && pCamera->bEnableShadowMap && !bRenderShadowMap) { if(cShadowBuffers == 0 && m_pLightMap && pCamera->bEnableLightMap && !bRenderShadowMap) {
int iTextureName = m_pShadowMap->getName(); int iTextureName = m_pLightMap->getName();
glActiveTexture(GL_TEXTURE3); glActiveTexture(GL_TEXTURE3);
glBindTexture(GL_TEXTURE_2D, iTextureName); glBindTexture(GL_TEXTURE_2D, iTextureName);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f);
@@ -97,7 +97,7 @@ void KRInstance::render(KRCamera *pCamera, KRModelManager *pModelManager, KRBoun
KRVector3 cameraPosObject = inverseModelMatrix.dot(cameraPosition); KRVector3 cameraPosObject = inverseModelMatrix.dot(cameraPosition);
KRVector3 lightDirObject = inverseModelMatrix.dot(lightDirection); KRVector3 lightDirObject = inverseModelMatrix.dot(lightDirection);
m_pModel->render(pCamera, pMaterialManager, bRenderShadowMap, mvpmatrix, cameraPosObject, lightDirection, pShadowMatrices, shadowDepthTextures, cShadowBuffers, pShaderManager, pTextureManager, m_pShadowMap); m_pModel->render(pCamera, pMaterialManager, bRenderShadowMap, mvpmatrix, cameraPosObject, lightDirection, pShadowMatrices, shadowDepthTextures, cShadowBuffers, pShaderManager, pTextureManager, m_pLightMap);
} }

View File

@@ -50,7 +50,7 @@ class KRBoundingVolume;
class KRInstance : public KRNode { class KRInstance : public KRNode {
public: public:
KRInstance(std::string instance_name, std::string model_name, const KRMat4 modelMatrix, std::string shadow_map); KRInstance(std::string instance_name, std::string model_name, const KRMat4 modelMatrix, std::string light_map);
virtual ~KRInstance(); virtual ~KRInstance();
virtual std::string getElementName(); virtual std::string getElementName();
@@ -68,8 +68,8 @@ public:
private: private:
KRModel *m_pModel; KRModel *m_pModel;
KRMat4 m_modelMatrix; KRMat4 m_modelMatrix;
KRTexture *m_pShadowMap; KRTexture *m_pLightMap;
std::string m_shadowMap; std::string m_lightMap;
std::string m_model_name; std::string m_model_name;
}; };

View File

@@ -156,9 +156,9 @@ bool KRMaterial::isTransparent() {
return m_tr != 0.0; return m_tr != 0.0;
} }
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
void KRMaterial::bind(KRMaterial **prevBoundMaterial, char *szPrevShaderKey, KRCamera *pCamera, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pShadowMap) { void KRMaterial::bind(KRMaterial **prevBoundMaterial, char *szPrevShaderKey, KRCamera *pCamera, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pLightMap) {
bool bSameMaterial = *prevBoundMaterial == this; bool bSameMaterial = *prevBoundMaterial == this;
bool bShadowMap = pShadowMap && pCamera->bEnableShadowMap; bool bLightMap = pLightMap && pCamera->bEnableLightMap;
if(!m_pAmbientMap && m_ambientMap.size()) { if(!m_pAmbientMap && m_ambientMap.size()) {
m_pAmbientMap = pTextureManager->getTexture(m_ambientMap.c_str()); m_pAmbientMap = pTextureManager->getTexture(m_ambientMap.c_str());
@@ -185,7 +185,7 @@ void KRMaterial::bind(KRMaterial **prevBoundMaterial, char *szPrevShaderKey, KRC
bool bNormalMap = m_pNormalMap != NULL && pCamera->bEnableNormalMap; bool bNormalMap = m_pNormalMap != NULL && pCamera->bEnableNormalMap;
bool bSpecMap = m_pSpecularMap != NULL && pCamera->bEnableSpecMap; bool bSpecMap = m_pSpecularMap != NULL && pCamera->bEnableSpecMap;
KRShader *pShader = pShaderManager->getShader(pCamera, bDiffuseMap, bNormalMap, bSpecMap, cShadowBuffers, bShadowMap, m_diffuseMapScale != default_scale && bDiffuseMap, m_specularMapScale != default_scale && bSpecMap, m_normalMapScale != default_scale && bNormalMap, m_diffuseMapOffset != default_offset && bDiffuseMap, m_specularMapOffset != default_offset && bSpecMap, m_normalMapOffset != default_offset && bNormalMap); KRShader *pShader = pShaderManager->getShader(pCamera, bDiffuseMap, bNormalMap, bSpecMap, cShadowBuffers, bLightMap, m_diffuseMapScale != default_scale && bDiffuseMap, m_specularMapScale != default_scale && bSpecMap, m_normalMapScale != default_scale && bNormalMap, m_diffuseMapOffset != default_offset && bDiffuseMap, m_specularMapOffset != default_offset && bSpecMap, m_normalMapOffset != default_offset && bNormalMap);
bool bSameShader = strcmp(pShader->getKey(), szPrevShaderKey) == 0; bool bSameShader = strcmp(pShader->getKey(), szPrevShaderKey) == 0;
if(!bSameShader) { if(!bSameShader) {

View File

@@ -75,7 +75,7 @@ public:
char *getName(); char *getName();
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
void bind(KRMaterial **prevBoundMaterial, char *szPrevShaderKey, KRCamera *pCamera, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pShadowMap); void bind(KRMaterial **prevBoundMaterial, char *szPrevShaderKey, KRCamera *pCamera, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pLightMap);
#endif #endif

View File

@@ -73,7 +73,7 @@ KRModel::~KRModel() {
} }
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
void KRModel::render(KRCamera *pCamera, KRMaterialManager *pMaterialManager, bool bRenderShadowMap, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pShadowMap) { void KRModel::render(KRCamera *pCamera, KRMaterialManager *pMaterialManager, bool bRenderShadowMap, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pLightMap) {
KRMaterial *pPrevBoundMaterial = NULL; KRMaterial *pPrevBoundMaterial = NULL;
int iPrevBuffer = -1; int iPrevBuffer = -1;
char szPrevShaderKey[128]; char szPrevShaderKey[128];
@@ -99,7 +99,7 @@ void KRModel::render(KRCamera *pCamera, KRMaterialManager *pMaterialManager, boo
KRMaterial *pMaterial = m_materials[iSubmesh]; KRMaterial *pMaterial = m_materials[iSubmesh];
if(pMaterial != NULL && pMaterial == (*mat_itr)) { if(pMaterial != NULL && pMaterial == (*mat_itr)) {
pMaterial->bind(&pPrevBoundMaterial, szPrevShaderKey, pCamera, mvpMatrix, cameraPosition, lightDirection, pShadowMatrices, shadowDepthTextures, cShadowBuffers, pShaderManager, pTextureManager, pShadowMap); pMaterial->bind(&pPrevBoundMaterial, szPrevShaderKey, pCamera, mvpMatrix, cameraPosition, lightDirection, pShadowMatrices, shadowDepthTextures, cShadowBuffers, pShaderManager, pTextureManager, pLightMap);
m_pMesh->renderSubmesh(iSubmesh, &iPrevBuffer); m_pMesh->renderSubmesh(iSubmesh, &iPrevBuffer);
} }
} }

View File

@@ -54,7 +54,7 @@ public:
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
void render(KRCamera *pCamera, KRMaterialManager *pMaterialManager, bool bRenderShadowMap, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pShadowMap); void render(KRCamera *pCamera, KRMaterialManager *pMaterialManager, bool bRenderShadowMap, KRMat4 &mvpMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRShaderManager *pShaderManager, KRTextureManager *pTextureManager, KRTexture *pLightMap);
#endif #endif

View File

@@ -268,10 +268,10 @@ void LoadNode(KRNode *parent_node, std::vector<KRResource *> &resources, KFbxGeo
} }
void LoadMesh(KRNode *parent_node, std::vector<KRResource *> &resources, KFbxGeometryConverter *pGeometryConverter, KFbxNode* pNode) { void LoadMesh(KRNode *parent_node, std::vector<KRResource *> &resources, KFbxGeometryConverter *pGeometryConverter, KFbxNode* pNode) {
std::string shadow_map = pNode->GetName(); std::string light_map = pNode->GetName();
shadow_map.append("_lightmap"); light_map.append("_lightmap");
KRInstance *new_instance = new KRInstance(pNode->GetName(), pNode->GetName(), KRMat4(), shadow_map); KRInstance *new_instance = new KRInstance(pNode->GetName(), pNode->GetName(), KRMat4(), light_map);
fbxDouble3 local_rotation = pNode->GetGeometricRotation(KFbxNode::eSOURCE_SET); fbxDouble3 local_rotation = pNode->GetGeometricRotation(KFbxNode::eSOURCE_SET);
fbxDouble3 local_translation = pNode->GetGeometricTranslation(KFbxNode::eSOURCE_SET); fbxDouble3 local_translation = pNode->GetGeometricTranslation(KFbxNode::eSOURCE_SET);
fbxDouble3 local_scale = pNode->GetGeometricScaling(KFbxNode::eSOURCE_SET); fbxDouble3 local_scale = pNode->GetGeometricScaling(KFbxNode::eSOURCE_SET);

View File

@@ -47,10 +47,10 @@ KRShaderManager::~KRShaderManager() {
} }
KRShader *KRShaderManager::getShader(KRCamera *pCamera, bool bDiffuseMap, bool bNormalMap, bool bSpecMap, int iShadowQuality, bool bShadowMap, bool bDiffuseMapScale,bool bSpecMapScale, bool bNormalMapScale, bool bDiffuseMapOffset, bool bSpecMapOffset, bool bNormalMapOffset) { KRShader *KRShaderManager::getShader(KRCamera *pCamera, bool bDiffuseMap, bool bNormalMap, bool bSpecMap, int iShadowQuality, bool bLightMap, bool bDiffuseMapScale,bool bSpecMapScale, bool bNormalMapScale, bool bDiffuseMapOffset, bool bSpecMapOffset, bool bNormalMapOffset) {
char szKey[128]; char szKey[128];
sprintf(szKey, "%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d", pCamera->bEnablePerPixel, bDiffuseMap, bNormalMap, bSpecMap, pCamera->bDebugPSSM, iShadowQuality, /*pCamera->dAmbientR, pCamera->dAmbientG, pCamera->dAmbientB, pCamera->dSunR, pCamera->dSunG, pCamera->dSunB, */pCamera->bEnableAmbient, pCamera->bEnableDiffuse, pCamera->bEnableSpecular, bShadowMap, bDiffuseMapScale, bSpecMapScale, bNormalMapScale, bDiffuseMapOffset, bSpecMapOffset, bNormalMapOffset); sprintf(szKey, "%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d", pCamera->bEnablePerPixel, bDiffuseMap, bNormalMap, bSpecMap, pCamera->bDebugPSSM, iShadowQuality, /*pCamera->dAmbientR, pCamera->dAmbientG, pCamera->dAmbientB, pCamera->dSunR, pCamera->dSunG, pCamera->dSunB, */pCamera->bEnableAmbient, pCamera->bEnableDiffuse, pCamera->bEnableSpecular, bLightMap, bDiffuseMapScale, bSpecMapScale, bNormalMapScale, bDiffuseMapOffset, bSpecMapOffset, bNormalMapOffset);
/* /*
@@ -72,7 +72,7 @@ KRShader *KRShaderManager::getShader(KRCamera *pCamera, bool bDiffuseMap, bool b
stream << "#define HAS_DIFFUSE_MAP " << (bDiffuseMap ? "1" : "0"); stream << "#define HAS_DIFFUSE_MAP " << (bDiffuseMap ? "1" : "0");
stream << "\n#define HAS_NORMAL_MAP " << (bNormalMap ? "1" : "0"); stream << "\n#define HAS_NORMAL_MAP " << (bNormalMap ? "1" : "0");
stream << "\n#define HAS_SPEC_MAP " << (bSpecMap ? "1" : "0"); stream << "\n#define HAS_SPEC_MAP " << (bSpecMap ? "1" : "0");
stream << "\n#define HAS_SHADOW_MAP " << (bShadowMap ? "1" : "0"); stream << "\n#define HAS_LIGHT_MAP " << (bLightMap ? "1" : "0");
stream << "\n#define HAS_NORMAL_MAP_SCALE " << (bNormalMapScale ? "1" : "0"); stream << "\n#define HAS_NORMAL_MAP_SCALE " << (bNormalMapScale ? "1" : "0");
stream << "\n#define HAS_SPEC_MAP_SCALE " << (bSpecMapScale ? "1" : "0"); stream << "\n#define HAS_SPEC_MAP_SCALE " << (bSpecMapScale ? "1" : "0");
stream << "\n#define HAS_DIFFUSE_MAP_SCALE " << (bDiffuseMapScale ? "1" : "0"); stream << "\n#define HAS_DIFFUSE_MAP_SCALE " << (bDiffuseMapScale ? "1" : "0");

View File

@@ -50,7 +50,7 @@ public:
KRShaderManager(const GLchar *szVertShaderSource, const GLchar *szFragShaderSource); KRShaderManager(const GLchar *szVertShaderSource, const GLchar *szFragShaderSource);
~KRShaderManager(); ~KRShaderManager();
KRShader *getShader(KRCamera *pCamera, bool bDiffuseMap, bool bNormalMap, bool bSpecMap, int iShadowQuality, bool bShadowMap, bool bDiffuseMapScale,bool bSpecMapScale, bool bNormalMapScale, bool bDiffuseMapOffset, bool bSpecMapOffset, bool bNormalMapOffset); KRShader *getShader(KRCamera *pCamera, bool bDiffuseMap, bool bNormalMap, bool bSpecMap, int iShadowQuality, bool bLightMap, bool bDiffuseMapScale,bool bSpecMapScale, bool bNormalMapScale, bool bDiffuseMapOffset, bool bSpecMapOffset, bool bNormalMapOffset);
private: private:
std::map<std::string, KRShader *> m_shaders; std::map<std::string, KRShader *> m_shaders;

View File

@@ -49,7 +49,7 @@ uniform sampler2D shadowTexture1;
varying highp vec4 shadowMapCoord1; varying highp vec4 shadowMapCoord1;
#endif #endif
#if HAS_SHADOW_MAP == 1 #if HAS_LIGHT_MAP == 1
uniform sampler2D shadowTexture1; uniform sampler2D shadowTexture1;
varying mediump vec2 shadowCoord; varying mediump vec2 shadowCoord;
#endif #endif
@@ -203,13 +203,11 @@ void main()
#endif #endif
// -------------------- Multiply shadow map -------------------- // -------------------- Multiply light map --------------------
#if HAS_SHADOW_MAP #if HAS_LIGHT_MAP
mediump vec3 shadowColor = vec3(texture2D(shadowTexture1, shadowCoord)); mediump vec3 shadowColor = vec3(texture2D(shadowTexture1, shadowCoord));
gl_FragColor = vec4(gl_FragColor.r * shadowColor.r, gl_FragColor.g * shadowColor.g, gl_FragColor.b * shadowColor.b, 1.0); gl_FragColor = vec4(gl_FragColor.r * shadowColor.r, gl_FragColor.g * shadowColor.g, gl_FragColor.b * shadowColor.b, 1.0);
// gl_FragColor = vec4(shadowColor, 1.0);
// gl_FragColor = vec4(shadowCoord.s, shadowCoord.t, 1.0, 1.0);
#endif #endif
} }

View File

@@ -46,7 +46,7 @@ uniform mediump float material_shininess;
varying highp vec2 texCoord; varying highp vec2 texCoord;
#endif #endif
#if HAS_SHADOW_MAP == 1 #if HAS_LIGHT_MAP == 1
varying mediump vec2 shadowCoord; varying mediump vec2 shadowCoord;
#endif #endif
@@ -169,7 +169,7 @@ void main()
#if HAS_SHADOW_MAP == 1 #if HAS_LIGHT_MAP == 1
// Pass shadow UV co-ordinates // Pass shadow UV co-ordinates
shadowCoord = shadowuv.st; shadowCoord = shadowuv.st;
#endif #endif