THREE ['shadowmap_fragment'] in r115

I am consoling log THREE.ShaderChunk[‘shadowmap_fragment’] but it is undefined in version r115. Is there any equivalent in that version?

Thanks in advance.

This specific shader chunk is gone for years, see:

I suggest you study the implementation of THREE.ShadowMaterial. The shadow code is now a bit different than five years ago.

2 Likes

Hello! Sorry for the late reply and thank you very much. Probably, next time I will extend the shader Phong material instead of importing chunks.

Thanks again!

@Mugen87
I want to study ShadowMaterial for a different reason - its just now working with log depthbuffer (as pointed out here and on this github issue)
looking for the ShadowMaterial implementation, I cannot really find anything.

theres barely any code at all inside there - what am I missing?

(nvm - you already fixxed it it seems)

1 Like

The shader itself is defined in a separate file:

But as you can see, it’s just a collection of shader chunks. These are located in the following directory:

If you want to study the shader code in a more complete manner, I suggest you use Spector.js (a WebGL development tool for the browser).

1 Like