ddiakopoulos / polymer

🎨 graphics/interaction prototyping sandbox
BSD 3-Clause "New" or "Revised" License
303 stars 21 forks source link

Shader asset - material interface for enabling/disabling variants. #17

Closed ddiakopoulos closed 6 years ago

ddiakopoulos commented 6 years ago

The gl_shader_asset object has facilities to compile variants based on included defines. A function needs to be written to analyze the currently used texture handles on a material and ensure its variant is compiled appropriately. Current materials simply define all potential shader defines, but this is actually a bug since not all materials will use all the define-available texture slots.

ddiakopoulos commented 6 years ago

This is fixed in 7a0539f4916bab34271cd303c59bbc35437962e7