Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Talk:Shader Coding - Best Practices

From FlightGear wiki
Jump to: navigation, search

Current OpenGL support.

Be aware that we currently _DO_NOT_ support glsl > 1.2x. Please don't mix glsl flavours, and what should eventually be part of a porting guide with best practices in the current context. It's confusing and will create issues sooner rather than later. If this guide is to be relevant in the current framework please stick to glsl 1.2x.(even though support for it is largely deprecated).

As the transition to OpenGL 3.0 / glsl >=1.3x is a very big undertaking, and not backward compatible, I think topics relevant to that should be separate, maybe even not mentioned yet until such an effort starts to take place.

Thank you,

I4dnf (talk) 14:36, 22 February 2014 (UTC)

Thank you for all the feedback here, it really is appreciated - but as long as people like you do not just share their knowledge via mailing lists, forums or "discussion" pages, but rather contribute directly to the corresponding article, it seems pretty likely that this could become a relevant guide pretty quickly. In other words, I invite you to add your feedback directly to the article, so that everybody can benefit from your knowledge - even 5 years from now, when the discussion page may no longer be around. We only have a handful of guys who really develop effects and GLSL shaders, so they're obviously in an excellent position to come up with requirements and to document "best practices", in a much better position than I am actually :)

--Hooray (talk) 15:24, 22 February 2014 (UTC)

Sorry, but so far I don't see the point of this page, yet. These best practices are already documented on the official OpenGL wiki, and in other places dealing with glsl development, where they are actively maintained, by people far more knowledgeable. Duplicating this information here, where it will sooner or later bitrot doesn't seem to be of much help, and will in fact eventually lead to bad practices. I haven't found anything that applies to OSG/Flightgear in particular, and that would indeed find it's place here. Maybe others did...
This means nothing more than that I don't see a point in contributing anything other than notifying the glaring issues / confusion sources present.
I4dnf (talk) 15:43, 22 February 2014 (UTC)
Right, that's another very good point - then again, we tend to "duplicate" quite some resources around here (not that I am a fan of that), and some of those articles seem to be highly popular actually, despite being next to impossible to locate -i.e. having 10k-20k views. Also, looking at the OpenGL wiki and what's written there - not all best practices documented there are being adopted in $FG_ROOT/Shaders obviously. So I am not sure how to proceed from here. I think there's something to be gained from having FG-centric docs here, just look at the number of C/C++ related tutorials about adding stuff to FG, these are also getting lots of exposure according to the wiki stats. I guess that I could find a handful of people on the forum who have never done any GLSL coding but who would like to dip their toes into effects/shaders, but they're simply lacking accessible docs --Hooray (talk) 16:29, 22 February 2014 (UTC)

Mentioning the GNU GPL license

Free Software Foundation (FSF) strongly (using the phrase "should look like") recommends a longer license statement. This can also be seen in some of the files in FlightGear.

For single files that would, except for that I have replaced GPL v.3 with v.2, be something like:

Cquote1.png
Copyright 2014 John Doe

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Cquote2.png

See FSF:s page How to use GNU licenses for your own software for the details.

Johan G (Talk | contribs) 10:36, 24 February 2014 (UTC)