In my scene I have flat objects (pseudo 2D) with light source in the middle, camera is static (isometric view). I want to achieve light effect like in Dont Starve:
As you can see, top bush and bottom right are in similar distance from light source. In real live bottom-right bush would be much darker than top one, because we would look at its dark side, not illuminated by light source.
In this fiddle: https://jsfiddle.net/980hx2c1/ i have similar situation, I want bottom right plane to be illuminated exactly the same as top one. This would be possible if the shader calculates final colour based on distance from light only and ignoring angle between light ray and vector normal to surface.
Can I achieve the same light effect using any specific material available in three js? Or should I create custom shader and calculate fragment final colour using formula:
finalColor = mix(materialBaseColor, blackColor, distanceFromLight * factor)?