Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I see alot of ccb shader scripts out there that load the shader script code embed in quotes using the following format:
My question is, why don't the creators of these scripts load the shader script code from an external file using this function instead:
It's alot more practical than peppering the scripts with all those embeded strings and "/n" lines. The shader code is also much easier to edit stored in it's own file. Anyone else ever thought of this ?? |
||||
|
It is done to keep all the code in the same file. While writing shaders I also read from separate files - as soon as it is done merge them into js file. |
||||
|
wrote: It is done to keep all the code in the same file. While writing shaders I also read from separate files - as soon as it is done merge them into js file. I know it keeps everything in a single file, but really, what's the benefit of this ?? Having to add all those strings must take some extra time and effort, apart from that, reading the code is a jumbled mess. |
||||
|
* If someone sends you one script, it always contains the shader source. No missing dependencies * It works the same way on desktop and web, you can't simply read local files using ccbReadFile on web * You close your code in case you only publish .exe * It is so happen historically It literally takes seconds to do so. What is your problem? - you want to distribute your stuff that way feel free to do so. |
||||
|
wrote: * If someone sends you one script, it always contains the shader source. No missing dependencies * It works the same way on desktop and web, you can't simply read local files using ccbReadFile on web * You close your code in case you only publish .exe * It is so happen historically It literally takes seconds to do so. What is your problem? - you want to distribute your stuff that way feel free to do so. I didn't know some people had a hard time handling more than 1 file.I don't have a problem with how someone decides to code, I was simply pointing out a much cleaner way of coding. Sorry I upset you. |
||||
|
|