Disable shadow casting by material

For context purposes, the question is about the following object:
window

This object is made up of a single mesh with multiple materials.
The idea is that this object should block all light, except for the glass material.
Is it possible to disable shadow casting for just the glass material?
I would like to have the effect of light coming into the room through the window,
but still have the glass keep its visible properties (like tinted glass for example).
Currently the only way I found to achieve this, is to set this material to visible = false.
That way light can pass through the glass but obviously loses its transparent color.

That means it’s a multi-material object. Since casting shadows can only be enabled/disabled on object level, I suggest you split the object into multiple meshes. That means based on BufferGeometry.groups you create a geometry for each group and use the respective material to create a mesh.

That’s what I thought, thank you very much for the reply!