Skip to content

MeshLambertMaterial and HemisphereLight #15530

@bunnybones1

Description

@bunnybones1

Hemisphere light and shadows appear applied in the wrong order on MeshLambertMaterial, in comparison to MeshPhongMaterial.

Here is a scene with a hemisphere light and a spotlight, using MeshPhongMaterial:
screen shot 2019-01-05 at 1 07 12 pm

Here is the same setup, but the materials are MeshLambertMaterial:
screen shot 2019-01-05 at 1 07 22 pm

Apparently, in phong's case, the shadows are applied before being re-illuminated with the hemisphere light, but in lambert's case, it looks like the hemisphere applies its illumination to the vertex color in the vertex shader, making it impossible to "re-illuminate" the shadow samples in the fragment shader. Passing an extra light color varying to the fragment for shadow re-illumination could be a solution. I'll try this and report back within a few days.

I should note that using Lambert with shadows and a hemisphere light has a relatively inexpensive but beautiful aesthetic.

I'm using THREE r100.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions