Koroldev Posted January 23, 2018 Share Posted January 23, 2018 Hi all, I want to ask about StandartMaterial, if I add to material a ambientColor or a diffuseColor or a specularColor it means that this colors mix with material.texture colors in every frame, or just at once and then new colors saves somewhere in buffer. Need to know this for performance, if all colors mixes every frame I think this bad for performance and I will be find some other ways. Thanks : ) Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted January 23, 2018 Share Posted January 23, 2018 hi @negrant all material in webgl is a shader and shader have 2 part vertex shader and fragment shader in each frame vertex shader run for all vertex in the mesh ( if mesh linked to material ) and fragment shader run per any pixel mesh looked in resolation so that color mix by texture in all pixel all happen in GPU and GPU designed for do that it is optimized too Koroldev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.