A tutorial is not ment to be dropped into your code, it just illustrates the idea.
Now, I don't know about how you code, but I actually prefer to write code myself than "dropping it in".
You can surely optimize the code and I won't say that that's not a valuable discussion, but for those that just want to learn it surely is a bit of a distraction and on top of that, your wording on that "critique" is not really constructive.
All your posts sounds pretty much the same, it's always like: "Yeah, pretty nice what you did there. Oh, also, fuck you"pubby8 wrote:It is very nice of you to write such an example, however I wanted to point out that there are numerous flaws in your method and that this code should not be used in game.
You should spend some time and optimize it.
But that's not how a forum or real life works. Pointing out that the code can be optimized and all is not a bad thing. But the way in which you do it is.
Also, like I said before, optimizing tutorial code is just bad, because it easily obfuscates the basic idea. While you might want to point out ways to optimize the method you don't want to actually include them in the same tutorial about basic lighting techniques. So at least start a new topic if you want to discuss optimization issues.