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

Howto:Shader programming in FlightGear

62 bytes added, 22:05, 12 October 2014
no edit summary
The ALS Landing Lights\Spotlight (we'll call it ALS Lights from now on) is a good example for showing how to incorporate a shader effect into [[Flightgear]] as it touches many parts of the visuals we see and many parts of the coding pipeline.
===Program Flow Simplified===
Preferences/Nasal/XML >> Property Tree >> Effect File >> Shader >> Rendered to Screen
===Preferences/Nasal/XML===
{{Note|need link to Preferences, Nasal and XML Docs here}}
Any combination of Preferences, Nasal or XML manipulates data in the property tree.
They show up in the Property Tree under sim/rendering/als-secondary-lights and can be activated or manipulated by normal Nasal calls or XML.
===Effects File===
{{Note|need link to Effects Doc here}}
*==== Parameters====
Parameter entries defined in the Effect file correspond to a property tree data container (static or variable). They will contain the data needed by the shader program to perform its magic. The type of information contained in the property tree might be program control data or variable/static data that the shader program can manipulate prior to sending on to render.
In the case of ALS Lights, below is some of the data passed to, and used by, the shader.
Some of this data may play a duel role inside the shader program. In other words it might be used to control other functions in addition to ALS Lights.
*==== Shader Program====
*==== Uniforms====
===Shader Program===*==== Uniform Input====
*==== Variable Assignments====
*==== Main Program====
255
edits

Navigation menu