How to make a texture looks very bright? Intensity of DirLight seems can't be used for that

Trying to learn how to control materials. Created some simple code with one dir light and a simple mat:

const dirLight = new DirectionalLight( "DirLight1", Vector3.Down(), this._scene );
dirLight.intensity = 100.0;

const mainAtlasTexture = new Texture(
	"assets/textures/texture.png", this._scene,
	false, false, Constants.TEXTURE_NEAREST_SAMPLINGMODE
);
mainAtlasMat = new StandardMaterial( "mainAtlasMat", this._scene );
mainAtlasMat.diffuseColor = new Color3( 1.0, 1.0, 1.0 );
// mainAtlasMat.emissiveColor = new Color3( 1.0, 1.0, 1.0 );
mainAtlasMat.diffuseTexture = mainAtlasTexture;

I though that’s the huge intensity for the light, don’t it? But my texture still looks like as usual. How to make it over-bright looking? To look it almost pure white because of a huge intensity.
Only standardMaterial looks very brightly when I haven’t applied any texture to a mesh.

In Blender I can achieve such effect by simply increasing an intensity of a directional light but seems Babylon’s directional light works in some different way and you can’t make texture looks brighter that it is by simply increasing intensity of dir light. Or am I missing something?

That’s because the final diffuse color is clamped between 0 and 1, see: Babylon.js/default.fragment.fx at 4db79e58f30581c800df02bde96fb1869ae8da07 · BabylonJS/Babylon.js · GitHub. You could try increasing the level of the texture instead?

1 Like

You can use an emissiveTexture that will brighten your material under light. You can push the level up to 2 if needed.
You can also push the diffuseTexture up to a level of 2.
On a PBRMaterial, you can also push the directIntensity on the material way beyond the max default of 1 (i.e. 10 or even 100)

2 Likes