this._light.needCube is not a function at e._createTargetRenderTexture

providing a screenshot without explaining won’t help us help you. reproduce on the playground, show us the position in which it happens, explain when it happens.

1 Like

I ran into this recently. The light you are passing in cannot be a hemisphere light. Not sure if this is by design or not.

1 Like

Passing in what ???

HemisphericLight

I think @bghgary meant passing a hemispheric light to a shadow generator. It is not supported indeed, only point, spot and directional lights can generate shadows.

1 Like

Yes. I think maybe we should throw a more user friendly error message when someone does this.

2 Likes

ShadowGenerator takes only IShadowLight as an input and hemispheric is not implementing it :slight_smile: so I am not to double check types again or we should do that in a lot of other places ?

1 Like

Oh, I guess that’s fine then.

1 Like