yanchith / webglutenfree

We serve your draw calls type-safe and gluten-free
https://yanchith.github.io/webglutenfree/
MIT License
8 stars 1 forks source link

Add validations for uniform types and shapes #9

Closed yanchith closed 6 years ago

yanchith commented 6 years ago

This PR adds uniform validation rules ensuring that all uniforms declared in shaders must match exactly with uniforms declared in the Command's uniform or texture options objects. There may be no orphan declarations in either. This validation is enabled only for process.env.NODE_ENV !== "production" to prevent producing garbage in production environments.