Hello,
Escuse my English. I am using Google Translate
I created a scene under Blender, it consists of Diffuse textures and an AtlasTexture including a LightMap.
Under JmonkeyEngineSDK, I can correctly place my materials.
The problem of survival in the part of the scene is in the dark. If I use a SpotLight, the light has no influence on the parts
obscure. (Example, a flashlight that illuminates a dark area)
If I understand goods, in the FragmentShader (Lighting.frag), the diffuseColor.rgb is multiplied by LightMapColor.
#ifdef LIGHTMAP
vec3 lightMapColor;
#ifdef SEPARATE_TEXCOORD
lightMapColor = texture2D(m_LightMap, texCoord2).rgb;
#else
lightMapColor = texture2D(m_LightMap, texCoord).rgb;
#endif
specularColor.rgb *= lightMapColor;
diffuseColor.rgb *= lightMapColor;
#endif
As a result, the diffuseColor is set to 0 when it is multiplied by a black area of ​​the LightMap.
The light of the SpotLight has no influence.
Is the technique I use correct?
How can I solve my problem ?
thank you in advance
THOCED