orels1 / orels-Unity-Shaders

A collection of practical Unity shaders for your next project
https://shaders.orels.sh
Other
168 stars 13 forks source link

Duplicate variable declarations should not generate warnings #32

Closed orels1 closed 11 months ago

orels1 commented 11 months ago

There is often a reason to declare the same variable in multiple modules to avoid them being undefined when modules aren't used together.

Currently, that generates a "skipped duplicate variable" warning on every recompile - which is distracting and undesirable.

While an argument can be made that special support for GLOBAL variables should be added for cross-module stuff, i think it makes sense to generally allow this to happen without warnings, and have a flag somewhere to enable debug-level compilation logs that would throw those warnings into the console.