I was looking something like this. If change brightness is enough for you, try to use the level property.
I tried to find this via google but it was failed. But ChatGPT provide a nice and worked example, let’s see it:
Yes, you can change the brightness of a video texture on a mesh in BabylonJS.
To do this, you can adjust the brightness of the video texture by modifying the videoTexture.level property. The level property controls the brightness of the texture, with a value of 1.0 representing the original brightness and lower values representing darker colors.
Here’s an example code snippet that demonstrates how to change the brightness of a video texture in BabylonJS:
// Load video texture
var video = document.createElement('video');
video.src = 'my-video.mp4';
var videoTexture = new BABYLON.VideoTexture('video', video, scene, true, true);
// Create a material with the video texture
var material = new BABYLON.StandardMaterial('material', scene);
material.diffuseTexture = videoTexture;
// Create a mesh with the material
var mesh = BABYLON.MeshBuilder.CreatePlane('mesh', { size: 5 }, scene);
mesh.material = material;
// Change the brightness of the video texture
videoTexture.level = 0.5; // This will make the texture appear darker
In this example, we first load a video and create a video texture from it. We then create a material with the video texture and apply it to a mesh. Finally, we change the brightness of the video texture by setting the level property to a lower value, making the texture appear darker.
Note that changing the brightness of the video texture using the level property will affect all materials that use the same video texture, so if you want to change the brightness of only one mesh, you should create a new video texture with a different level value for that mesh.