Three.js shader pointLight to global position
问题 All hello, I'm doing a fog shader and trying to add light sources. Recently I asked how to correctly determine the position of the light source, the question was solved, but another problem turned out, for the fog I use the position of the modelMatrix vec3 fogVPosition = (modelMatrix * vec4( position, 1.0 )).xyz To calculate the intensity of light, I use the calculation of the distance from the light source to the point of fog. float diffuseCoefficient = max( 1.0 - (distance(pointLights[i]