Lighting and Shadows from HDR Texture

Hello , please i dont find how to get Lighting and Shadows from HDR Texture

For normal light i use this command , and it is work
var shadowGenerator = new BABYLON.ShadowGenerator(1024,light);

But when i want shadows and light from HDR i use this command and it isnt work

var shadowGenerator = new BABYLON.ShadowGenerator(1024,hdrTexture);


You can not cast shadows from hdr textures. you would need to bake them in a light maps.

This would be too slow to compute in real time.

In Webgl (cause with RTX now it is getting there :slight_smile: )

1 Like

So Hdrtexture is just for reflexion ?

And why there is Skybox and HdrTexture if skybox can also give reflexion for PBR materials ?


The skybox does not provide the reflection itslef. It only displays it in the background.

The materials and the skybox actually share the textures but use a different coordinate mapping.

Hi , this exemple show that we can have reflection from skybox without HDR

I am missing something ?


I can not be use with pbr material, or the roughness will be wrong