This is a material setting, not a light setting.
It seems to me that in the first screenshot you set it up the way you like … keep using it instead of your set up 2?
To explain, basically in my project I have an object and I allow users to upload textures on it (mandatory) and glosiness if they want.
So the texture is mandatory but not the glossiness, so I would like it to look good if there is no glossiness. But I want to keep that glowing effect when there is one.
I don’t know if it’s clear ?
Does the suggestion of setting the glossiness to zero / really small value does not help here in the case the user does not attach the glossiness texture?
var Texture = pc.createScript('texture');
// initialize code called once per entity
Texture.prototype.initialize = function () {
if (hasSpecularTexture) {
material.shininess = 90;
} else {
material.shininess = 0;
}
material.update();
};
// update code called every frame
Texture.prototype.update = function (dt) {
};
I download my 2 diffuses from github. the scripts are : load-verso and load-recto.
Then I download the 2 glossiness; it’s the load-verso-gloss and load-recto-gloss scripts.
Then I have the two scripts shininess and shininess1 which must check if there is a gloss, if so we set the shininess to 80 otherwise to 0. but those don’t work
Actually I just want to understand how I can focus the glosiness entity.
So i can do :
If there is a texture on the glossiness then I set the shininess to 80 otherwise I set it to 0.
But I can’t find how to get these values which must be null when there is nothing and full when there is a texture on it.