Looking for who fixes this texture projection matrix

I have something for you:

https://playground.babylonjs.com/#9UU80W#72

The trick is to put the spot at the center of the target (the glass) and use in the shader code strq.z >= -${wallHalfThicknessShader} to have the projection only on the right wall.

Note that each light is using a uniform buffer in the shader code and you only have a limited number of such buffers (depending on your card - often 16 or 18). So, having a single mesh for the whole house may not work if you have too many windows: you may need to avoid merging the meshes to be on the safe side.

4 Likes