Howto:Shader programming in FlightGear: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 370: Line 370:
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.
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.
In the case of ALS Lights, below is some of the data passed to, and used by, the shader.
  <display_xsize><use>/sim/startup/xsize</use></display_xsize>
  <small><display_xsize><use>/sim/startup/xsize</use></display_xsize>
  <display_ysize><use>/sim/startup/ysize</use></display_ysize>
  <display_ysize><use>/sim/startup/ysize</use></display_ysize>
  <view_pitch_offset><use>/sim/current-view/pitch-offset-deg</use></view_pitch_offset>
  <view_pitch_offset><use>/sim/current-view/pitch-offset-deg</use></view_pitch_offset>
Line 382: Line 382:
  <quality_level><use>/sim/rendering/shaders/landmass</use></quality_level>
  <quality_level><use>/sim/rendering/shaders/landmass</use></quality_level>
  <tquality_level><use>/sim/rendering/shaders/transition</use></tquality_level>
  <tquality_level><use>/sim/rendering/shaders/transition</use></tquality_level>
 
</small>
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.
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.
   
   
330

edits

Navigation menu