You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SSR adds reality to rendering and despite I'm new to three.js, I feel its SSR post effect is fine.
But you can only control on or off of the "metalness" of each object by applying substitute material below depending on if it's in "selects" or not.
SSRPass.js:
// metalnessOn material
this.metalnessOnMaterial = new MeshBasicMaterial({
color: 'white'
});
// metalnessOff material
this.metalnessOffMaterial = new MeshBasicMaterial({
color: 'black'
});
The workaround I use is to make intermediate materials like
SSRPass.js:
// withMetalness material
this.withMetalnessMaterial = [];
for (let i = 0; i < 256; i++) {
const rgb = i / 255.0;
this.withMetalnessMaterial[i] = new MeshBasicMaterial({
color: new Color(rgb, rgb, rgb),
});
}
Description
SSR adds reality to rendering and despite I'm new to three.js, I feel its SSR post effect is fine.
But you can only control on or off of the "metalness" of each object by applying substitute material below depending on if it's in "selects" or not.
And it is uses like switch as below.
So the scene tends to be shown too metallic.
Solution
The workaround I use is to make intermediate materials like
and use it instead of metalnessOnMaterial like
Then use it as below.
Alternatives
As I said, I'm new to three.js thus there might be better or even existing solution.
Additional context
No response
The text was updated successfully, but these errors were encountered: