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

Changes

Jump to: navigation, search

Project Rembrandt

209 bytes added, 11:29, 6 May 2012
Syntax highlight seems to work
If you are seeing error messages during startup or FlightGear doesn't start up properly, it's probably because you don't have enough free video memory. Reduce the size of the shadow map in preferences.xml by locating
<presyntaxhighlight lang="xml">
<map-size type="int">8192</map-size>
</presyntaxhighlight>
And put 4096 or 2048 instead.
For material shaders, it is necessary to provide both <tt>gbuffer-functions.frag</tt> and <tt>gbuffer-encode.frag</tt> in the effect file, like this :
<pre syntaxhighlight lang="xml">
<program>
<vertex-shader>Shaders/ubershader.vert</vertex-shader>
<fragment-shader>Shaders/gbuffer-encode.frag</fragment-shader>
</program>
</presyntaxhighlight>
For fullscreen passes shaders, only <tt>gbuffer-functions.frag</tt> should be provided, like this :
<pre syntaxhighlight lang="xml">
<program>
<vertex-shader>Shaders/sunlight.vert</vertex-shader>
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
</program>
</presyntaxhighlight>
In the main function of the shader, the functions referenced need to be declared first. With no #include files, the whole function prototype needs to be typed :
<presyntaxhighlight lang="glsl">
void encode_gbuffer(vec3 normal, vec3 color, int mId, float specular, float shininess, float emission, float depth);
encode_gbuffer(normal, color, mId, specular, shininess, emission, depth);
}
</presyntaxhighlight>
=== Geometry Stage ===
{|cellpadding=10|
|valign=top|
<presyntaxhighlight lang="xml">
<animation>
<type>light</type>
<far-m>39</far-m>
</animation>
</presyntaxhighlight>
|valign=top|
{| class="wikitable" cellpadding="3"
{|cellpadding=10|
|valign=top|
<presyntaxhighlight lang="xml">
<animation>
<type>light</type>
<far-m>39</far-m>
</animation>
</presyntaxhighlight>
|valign=top|
{| class="wikitable" cellpadding="3"
269
edits

Navigation menu