0beqz / realism-effects

SSGI, Motion Blur, TRAA - Effects to enhance your three.js scene's realism
https://realism-effects-obeqz.vercel.app/
MIT License
1.41k stars 63 forks source link

Changing color in the material on runtime won't work #43

Open benzsuankularb opened 6 months ago

benzsuankularb commented 6 months ago

Changing "color" in the material on runtime won't work.

It seems like propsPrimitive didn't have color property inherited from Material class. (https://github.com/0beqz/realism-effects/blob/main/src/gbuffer/material/GBufferMaterial.js)

let props = Object.keys(gBufferMaterial)

props = props.filter(
    key => !key.startsWith("_") && !key.startsWith("is") && key !== "uuid" && key !== "type" && key !== "transparent"
)

const propsPrimitive = props.filter(
    key => typeof gBufferMaterial[key] === "string" || typeof gBufferMaterial[key] === "number"
)
0beqz commented 5 months ago

Thanks for the reporting, I'll look into fixing it.