Effects file for surface lights
[fg:toms-fgdata.git] / gui / dialogs / rendering.xml
1 <?xml version="1.0"?>
2
3 <PropertyList>
4         <name>rendering</name>
5         <modal>false</modal>
6         <layout>vbox</layout>
7         <padding>20</padding>
8
9         <group>
10                 <layout>hbox</layout>
11                 <empty>
12                         <stretch>1</stretch>
13                 </empty>
14
15                 <text>
16                         <label>Rendering Options</label>
17                 </text>
18
19                 <empty>
20                         <stretch>1</stretch>
21                 </empty>
22
23                 <button>
24                         <pref-width>16</pref-width>
25                         <pref-height>16</pref-height>
26                         <legend></legend>
27                         <keynum>27</keynum>
28                         <border>2</border>
29                         <binding>
30                                 <command>dialog-close</command>
31                         </binding>
32                 </button>
33         </group>
34
35         <hrule/>
36
37   <text>
38     <visible>
39       <equals>
40         <property>/sim/gui/dialogs/rendering/shader-warning</property>
41         <value>1</value>
42       </equals>
43     </visible>
44     <color>
45       <red>1.0</red>
46       <green>0.6</green>
47       <blue>0.6</blue>
48     </color>
49     <label>Warning: Intel integrated graphics detected.  Your graphics card may not support shaders or complex graphics.</label>
50   </text>
51
52         <group>
53                 <halign>center</halign>
54                 <layout>hbox</layout>
55
56                 <group>
57                         <layout>vbox</layout>
58
59                         <group>
60                                 <layout>hbox</layout>
61                                 <text>
62                                         <label>General</label>
63                                         <halign>left</halign>
64                                 </text>
65                                 <hrule>
66                                         <stretch>true</stretch>
67                                 </hrule>
68                         </group>
69
70                         <checkbox>
71                                 <halign>left</halign>
72                                 <label>Wireframe</label>
73                                 <name>wireframe</name>
74                                 <property>/sim/rendering/wireframe</property>
75                                 <binding>
76                                         <command>dialog-apply</command>
77                                         <object-name>wireframe</object-name>
78                                 </binding>
79                         </checkbox>
80
81                         <!--
82                         <group>
83                                 <layout>hbox</layout>
84                                 <text>
85                                 <label>Lighting</label>
86                                 <halign>left</halign>
87                                 </text>
88                                 <hrule>
89                                 <stretch>true</stretch>
90                                 </hrule>
91                         </group>
92
93                         <checkbox>
94                                 <halign>left</halign>
95                                 <label>Sun/Moon horizon effect</label>
96                                 <property>/sim/rendering/horizon-effect</property>
97                                 <binding>
98                                         <command>dialog-apply</command>
99                                 </binding>
100                         </checkbox>
101                         -->
102
103                         <checkbox>
104                                 <halign>left</halign>
105                                 <label>Use point sprites for runway lights</label>
106                                 <property>/sim/rendering/point-sprites</property>
107                                 <binding>
108                                         <command>dialog-apply</command>
109                                 </binding>
110                         </checkbox>
111
112                         <!--
113                         <checkbox>
114                                 <halign>left</halign>
115                                 <label>Enhanced runway lighting</label>
116                                 <property>/sim/rendering/enhanced-lighting</property>
117                                 <binding>
118                                         <command>dialog-apply</command>
119                                 </binding>
120                         </checkbox>
121
122                         <checkbox>
123                                 <halign>left</halign>
124                                 <label>Runway light distance attenuation</label>
125                                 <property>/sim/rendering/distance-attenuation</property>
126                                 <binding>
127                                         <command>dialog-apply</command>
128                                 </binding>
129                         </checkbox>
130
131                         <checkbox>
132                                 <halign>left</halign>
133                                 <label>Specular reflections on objects</label>
134                                 <property>/sim/rendering/specular-highlight</property>
135                                 <binding>
136                                         <command>dialog-apply</command>
137                                 </binding>
138                         </checkbox>
139                         -->
140                         <group>
141                                 <layout>hbox</layout>
142                                 <halign>left</halign>
143
144                                 <checkbox>
145                                         <label>Throttle frame rate</label>
146                                         <name>frame-rate-throttle</name>
147                                         <property>/sim/gui/frame-rate-throttled</property>
148                                         <binding>
149                                                 <command>dialog-apply</command>
150                                                 <object-name>frame-rate-throttle</object-name>
151                                         </binding>
152                                         <binding>
153                                                 <command>nasal</command>
154                                                 <script>
155                                                         var throttled = getprop("/sim/gui/frame-rate-throttled");
156                                                         if (throttled)
157                                                                 setprop("/sim/frame-rate-throttle-hz", 50);
158                                                         else
159                                                                 setprop("/sim/frame-rate-throttle-hz", 0);
160                                                 </script>
161                                         </binding>
162                                 </checkbox>
163                                 <empty>
164                                         <pref-width>46</pref-width>
165                                 </empty>
166                                 <slider>
167                                         <name>frame-rate</name>
168                                         <visible>
169                                                 <greater-than>
170                                                         <property>/sim/frame-rate-throttle-hz</property>
171                                                         <value>0</value>
172                                                 </greater-than>
173                                         </visible>
174                                         <min>15.0</min>
175                                         <max>70.0</max>
176                                         <step>1.0</step>
177                                         <live>true</live>
178                                         <property>/sim/frame-rate-throttle-hz</property>
179                                         <binding>
180                                                 <command>dialog-apply</command>
181                                                 <object-name>frame-rate</object-name>
182                                         </binding>
183                                 </slider>
184                                 <text>
185                                         <visible>
186                                                 <greater-than>
187                                                         <property>/sim/frame-rate-throttle-hz</property>
188                                                         <value>0</value>
189                                                 </greater-than>
190                                         </visible>
191                                         <label>99 Hz</label>
192                                         <format>%2.0f Hz</format>
193                                         <live>true</live>
194                                         <property>/sim/frame-rate-throttle-hz</property>
195                                 </text>
196                         </group>
197
198                         <!--
199
200                         <checkbox>
201                                 <halign>left</halign>
202                                 <label>Lightning</label>
203                                 <property>/sim/rendering/lightning-enable</property>
204                                 <binding>
205                                         <command>dialog-apply</command>
206                                 </binding>
207                         </checkbox>
208
209                         -->
210
211                         <checkbox>
212                                 <halign>left</halign>
213                                 <label>Compensate field of view for wider screens</label>
214                                 <property>sim/current-view/field-of-view-compensation</property>
215                                 <binding>
216                                         <command>nasal</command>
217                                         <script>view.screenWidthCompens.toggle()</script>
218                                 </binding>
219                         </checkbox>
220
221                         <group>
222                                 <layout>hbox</layout>
223                                 <text>
224                                         <label>Scenery</label>
225                                         <halign>left</halign>
226                                 </text>
227                                 <hrule>
228                                         <stretch>true</stretch>
229                                 </hrule>
230                         </group>
231
232                         <group>
233                                 <layout>table</layout>
234
235                                 <text>
236                                         <row>0</row>
237                                         <col>0</col>
238                                         <halign>left</halign>
239                                         <label>Terrain texture scheme</label>
240         </text>
241
242         <combo>
243           <row>0</row>
244           <col>1</col>
245           <colspan>3</colspan>
246           <name>texture-set</name>
247           <halign>fill</halign>
248           <stretch>true</stretch>
249           <pref-width>180</pref-width>
250           <property>sim/gui/dialogs/rendering/texture-set</property>
251           <value>Region-specific</value>
252           <value>Global</value>
253           <value>Global alternative (DDS format)</value>
254           <binding>
255             <command>dialog-apply</command>
256             <object-name>texture-set</object-name>
257           </binding>
258           <binding>
259             <command>nasal</command>
260             <script>
261               var file = materials[getprop("/sim/gui/dialogs/rendering/texture-set")];
262               setprop("/sim/rendering/materials-file", file);
263             </script>
264           </binding>
265           <binding>
266             <command>reload-materials</command>
267           </binding>
268         </combo>
269
270                                 <checkbox>
271                                         <row>1</row>
272                                         <col>0</col>
273                                         <halign>left</halign>
274                                         <label>Animated jetways</label>
275                                         <name>jetways</name>
276                                         <property>/nasal/jetways/enabled</property>
277                                         <binding>
278                                                 <command>dialog-apply</command>
279                                                 <object-name>jetways</object-name>
280                                         </binding>
281                                 </checkbox>
282
283                                 <checkbox>
284                                         <row>2</row>
285                                         <col>0</col>
286                                         <halign>left</halign>
287                                         <label>Random buildings</label>
288                                         <name>random-buildings</name>
289                                         <property>/sim/rendering/random-buildings</property>
290                                         <binding>
291                                                 <command>dialog-apply</command>
292                                                 <object-name>random-buildings</object-name>
293                                         </binding>
294                                 </checkbox>
295
296                                 <text>
297                                   <row>2</row>
298                                   <col>1</col>
299                                         <colspan>3</colspan>
300           <color>
301             <red>1.0</red>
302             <green>0.6</green>
303             <blue>0.6</blue>
304           </color>
305                                   <label>Warning: Requires lots of memory</label>
306         </text>
307
308                                 <checkbox>
309                                         <row>3</row>
310                                         <col>0</col>
311                                         <halign>left</halign>
312                                         <label>Random objects</label>
313                                         <name>random-objects</name>
314                                         <property>/sim/rendering/random-objects</property>
315                                         <binding>
316                                                 <command>dialog-apply</command>
317                                                 <object-name>random-objects</object-name>
318                                         </binding>
319                                 </checkbox>
320
321                                 <checkbox>
322                                         <row>4</row>
323                                         <col>0</col>
324                                         <halign>left</halign>
325                                         <label>Random vegetation</label>
326                                         <name>random-vegetation</name>
327                                         <property>/sim/rendering/random-vegetation</property>
328                                         <binding>
329                                                 <command>dialog-apply</command>
330                                                 <object-name>random-vegetation</object-name>
331                                         </binding>
332                                 </checkbox>
333                                 <text>
334                                         <row>4</row>
335                                         <col>1</col>
336                                         <label>density</label>
337                                         <enable>
338                                                 <property>/sim/rendering/random-vegetation</property>
339                                         </enable>
340                                 </text>
341                                 <slider>
342                                         <row>4</row>
343                                         <col>2</col>
344                                         <name>vegetation-density</name>
345                                         <min>0</min>
346                                         <max>10.0</max>
347                                         <step>0.1</step>
348                                         <property>/sim/rendering/vegetation-density</property>
349                                         <binding>
350                                                 <command>dialog-apply</command>
351                                                 <object-name>vegetation-density</object-name>
352                                         </binding>
353                                 </slider>
354                                 <text>
355                                         <row>4</row>
356                                         <col>3</col>
357                                         <label>12345678</label>
358                                         <format>%.1f</format>
359                                         <live>true</live>
360                                         <property>/sim/rendering/vegetation-density</property>
361                                         <enable>
362                                                 <property>/sim/rendering/random-vegetation</property>
363                                         </enable>
364                                 </text>
365
366                         </group>
367
368                         <button>
369                                 <legend>Reload Scenery</legend>
370                                 <binding>
371                                         <command>reinit</command>
372                                         <subsystem>tile-manager</subsystem>
373                                 </binding>
374                         </button>
375
376                         <group>
377                                 <layout>vbox</layout>
378                                 <stretch>1</stretch>
379                         </group>
380
381                 </group>
382
383                 <vrule/>
384
385                 <group>
386                         <layout>vbox</layout>
387
388                         <group>
389                                 <layout>hbox</layout>
390                                 <text>
391                                         <label>Shader effects</label>
392                                         <halign>left</halign>
393                                 </text>
394                                 <hrule>
395                                         <stretch>true</stretch>
396                                 </hrule>
397                         </group>
398
399                         <group>
400                                 <layout>table</layout>
401
402                                 <checkbox>
403                                         <halign>left</halign>
404                                         <row>0</row>
405                                         <col>0</col>
406                                         <label>Custom settings (fine-tuning)</label>
407                                         <name>custom-settings</name>
408                                         <property>/sim/rendering/shaders/custom-settings</property>
409                                         <binding>
410                                                 <command>dialog-apply</command>
411                                                 <object-name>custom-settings</object-name>
412                                         </binding>
413                                 </checkbox>
414
415                                 <group>
416                                         <layout>hbox</layout>
417                                         <row>1</row>
418                                         <col>0</col>
419                                         <visible>
420                                                 <not>
421                                                         <property>/sim/rendering/shaders/custom-settings</property>
422                                                 </not>
423                                         </visible>
424
425                                         <text>
426                                                 <label>Performance</label>
427                                         </text>
428                                         <slider>
429                                                 <name>quality-level</name>
430                                                 <min>0.0</min>
431                                                 <max>5.0</max>
432                                                 <step>1.0</step>
433                                                 <fraction>0.17</fraction>
434                                                 <property>/sim/rendering/shaders/quality-level-internal</property>
435                                                 <binding>
436                                                         <command>dialog-apply</command>
437                                                         <object-name>quality-level</object-name>
438                                                 </binding>
439                                         </slider>
440                                         <text>
441                                                 <label>Quality</label>
442                                         </text>
443                                         <text>
444                                                 <label>12345678</label>
445                                                 <format>(%1.0f)</format>
446                                                 <live>true</live>
447                                                 <property>/sim/rendering/shaders/quality-level-internal</property>
448                                         </text>
449
450                                 </group>
451
452                                 <group>
453                                         <layout>hbox</layout>
454                                         <row>1</row>
455                                         <col>0</col>
456                                         <visible>
457                                                 <and>
458                                                         <property>/sim/rendering/shaders/custom-settings</property>
459                                                         <not>
460                                                                 <property>/sim/rendering/shaders/skydome</property>
461                                                         </not>
462                                                 </and>
463                                         </visible>
464
465                                         <button>
466                                                 <legend>Shader Options</legend>
467                                                 <halign>left</halign>
468                                                 <binding>
469                                                         <command>dialog-show</command>
470                                                         <dialog-name>shaders</dialog-name>
471                                                 </binding>
472                                                 <binding>
473                                                         <command>dialog-close</command>
474                                                         <dialog-name>rendering</dialog-name>
475                                                 </binding>
476                                                 <pref-width>200</pref-width>
477                                         </button>
478
479                                 </group>
480                                 <group>
481                                         <layout>hbox</layout>
482                                         <row>1</row>
483                                         <col>0</col>
484                                         <visible>
485                                                 <and>
486                                                         <property>/sim/rendering/shaders/custom-settings</property>
487                                                         <property>/sim/rendering/shaders/skydome</property>
488                                                         <not>
489                                                                 <property>/sim/rendering/rembrandt/enabled</property>
490                                                         </not>
491                                                 </and>
492                                         </visible>
493
494                                         <button>
495                                                 <legend>Shader Options</legend>
496                                                 <halign>left</halign>
497                                                 <binding>
498                                                         <command>dialog-show</command>
499                                                         <dialog-name>shaders-lightfield</dialog-name>
500                                                 </binding>
501                                                 <binding>
502                                                         <command>dialog-close</command>
503                                                         <dialog-name>rendering</dialog-name>
504                                                 </binding>
505                                                 <pref-width>200</pref-width>
506                                         </button>
507
508                                 </group>
509
510                         </group>
511
512                         <group>
513                                 <layout>hbox</layout>
514                                 <text>
515                                         <label>Atmospheric effects</label>
516                                         <halign>left</halign>
517                                 </text>
518                                 <hrule>
519                                         <stretch>true</stretch>
520                                 </hrule>
521                         </group>
522
523                         <checkbox>
524                                 <halign>left</halign>
525                                 <label>Particles (smoke, dust, spray)</label>
526                                 <name>particles</name>
527                                 <property>/sim/rendering/particles</property>
528                                 <binding>
529                                         <command>dialog-apply</command>
530                                         <object-name>particles</object-name>
531                                 </binding>
532                         </checkbox>
533
534                         <checkbox>
535                                 <halign>left</halign>
536                                 <label>Precipitation</label>
537                                 <name>precipitation</name>
538                                 <property>/sim/rendering/precipitation-gui-enable</property>
539                                 <binding>
540                                         <command>dialog-apply</command>
541                                         <object-name>precipitation</object-name>
542                                 </binding>
543                         </checkbox>
544
545                         <!--
546
547                         <checkbox>
548                                 <halign>left</halign>
549                                 <label>2D clouds</label>
550                                 <property>/sim/rendering/bump-mapping</property>
551                                 <binding>
552                                         <command>dialog-apply</command>
553                                 </binding>
554                         </checkbox>
555
556                         -->
557
558                         <checkbox>
559                                 <halign>left</halign>
560                                 <label>3D clouds</label>
561                                 <name>3d-clouds</name>
562                                 <property>/sim/rendering/clouds3d-enable</property>
563                                 <binding>
564                                         <command>dialog-apply</command>
565                                         <object-name>3d-clouds</object-name>
566                                 </binding>
567                         </checkbox>
568
569                         <group>
570                                 <layout>hbox</layout>
571                                 <halign>right</halign>
572                                 <text>
573                                         <label>Cloud density</label>
574                                         <enable>
575                                                 <property>/sim/rendering/clouds3d-enable</property>
576                                         </enable>
577                                 </text>
578                                 <slider>
579                                         <name>cloud-density</name>
580                                         <min>0</min>
581                                         <max>1.0</max>
582                                         <property>/sim/rendering/clouds3d-density</property>
583                                         <binding>
584                                                 <command>dialog-apply</command>
585                                                 <object-name>cloud-density</object-name>
586                                         </binding>
587                                         <binding>
588                                                 <command>property-toggle</command>
589                                                 <property>/sim/rendering/clouds3d-enable</property>
590                                         </binding>
591                                         <binding>
592                                                 <command>property-toggle</command>
593                                                 <property>/sim/rendering/clouds3d-enable</property>
594                                         </binding>
595                                 </slider>
596                                 <text>
597                                         <enable>
598                                                 <property>/sim/rendering/clouds3d-enable</property>
599                                         </enable>
600                                         <label>12345678</label>
601                                         <format>%.2f</format>
602                                         <live>true</live>
603                                         <property>/sim/rendering/clouds3d-density</property>
604                                 </text>
605                         </group>
606
607                         <group>
608                                 <layout>hbox</layout>
609                                 <halign>right</halign>
610                                 <text>
611                                         <label>Cloud visibility range</label>
612                                         <enable>
613                                                 <property>/sim/rendering/clouds3d-enable</property>
614                                         </enable>
615                                 </text>
616                                 <slider>
617                                         <name>cloud-vis-range</name>
618                                         <min>1000.0</min>
619                                         <max>150000.0</max>
620                                         <property>/sim/rendering/clouds3d-vis-range</property>
621                                         <binding>
622                                                 <command>dialog-apply</command>
623                                                 <object-name>cloud-vis-range</object-name>
624                                         </binding>
625                                 </slider>
626                                 <text>
627                                         <enable>
628                                                 <property>/sim/rendering/clouds3d-enable</property>
629                                         </enable>
630                                         <label>12345678</label>
631                                         <format>%.fm</format>
632                                         <live>true</live>
633                                         <property>/sim/rendering/clouds3d-vis-range</property>
634                                 </text>
635                         </group>
636
637                         <group>
638                                 <layout>table</layout>
639                                 <group>
640                                         <layout>hbox</layout>
641                                         <halign>left</halign>
642                                         <row>0</row>
643                                         <col>0</col>
644                                         <checkbox>
645                                                 <halign>left</halign>
646                                                 <label>Atmospheric light scattering</label>
647                                                 <name>skydome-scattering</name>
648                                                 <visible>
649                                                         <not>
650                                                                 <property>/sim/rendering/rembrandt/enabled</property>
651                                                         </not>
652                                                 </visible>
653                                                 <property>/sim/rendering/shaders/skydome</property>
654                                                 <binding>
655                                                         <command>dialog-apply</command>
656                                                         <object-name>skydome-scattering</object-name>
657                                                 </binding>
658                                         </checkbox>
659                                         <!--<text>
660                                                 <label>(Experimental)</label>
661                                                 <visible>
662                                                         <not>
663                                                                 <property>/sim/rendering/rembrandt/enabled</property>
664                                                         </not>
665                                                 </visible>
666                                                 <color>
667                                                         <red>1.0</red>
668                                                         <green>0.6</green>
669                                                         <blue>0.6</blue>
670                                                 </color>
671                                         </text>-->
672                                 </group>
673                                 <!--<text>
674                                         <row>1</row>
675                                         <col>0</col>
676                                         <label>This disables most effects/shaders.</label>
677                                         <halign>left</halign>
678                                         <visible>
679                                                 <not>
680                                                         <property>/sim/rendering/rembrandt/enabled</property>
681                                                 </not>
682                                         </visible>
683                                         <color>
684                                                 <red>1.0</red>
685                                                 <green>0.6</green>
686                                                 <blue>0.6</blue>
687                                         </color>
688                                 </text>-->
689
690                                 <group>
691                                         <layout>hbox</layout>
692                                         <row>0</row>
693                                         <col>0</col>
694
695                                         <text>
696                                                 <label>Rembrandt</label>
697                                                 <halign>left</halign>
698                                                 <visible>
699                                                         <property>/sim/rendering/rembrandt/enabled</property>
700                                                 </visible>
701                                         </text>
702                                         <text>
703                                                 <label>(Experimental)</label>
704                                                 <halign>left</halign>
705                                                 <color>
706                                                         <red>1.0</red>
707                                                         <green>0.6</green>
708                                                         <blue>0.6</blue>
709                                                 </color>
710                                                 <visible>
711                                                         <property>/sim/rendering/rembrandt/enabled</property>
712                                                 </visible>
713                                         </text>
714                                         <hrule>
715                                                 <stretch>true</stretch>
716                                                 <visible>
717                                                         <property>/sim/rendering/rembrandt/enabled</property>
718                                                 </visible>
719                                         </hrule>
720                                 </group>
721
722                                 <button>
723                                         <row>1</row>
724                                         <col>0</col>
725                                         <visible>
726                                                 <property>/sim/rendering/rembrandt/enabled</property>
727                                         </visible>
728                                         <legend>Rembrandt Options</legend>
729                                         <halign>center</halign>
730                                         <binding>
731                                                 <command>dialog-show</command>
732                                                 <dialog-name>rembrandt</dialog-name>
733                                         </binding>
734                                         <binding>
735                                                 <command>dialog-close</command>
736                                                 <dialog-name>rendering</dialog-name>
737                                         </binding>
738                                         <pref-width>200</pref-width>
739                                 </button>
740
741                         </group>
742
743                         <empty>
744                                 <stretch>1</stretch>
745                         </empty>
746
747                 </group>
748         </group>
749
750         <hrule/>
751
752         <button>
753                 <legend>Close</legend>
754                 <default>true</default>
755                 <key>Esc</key>
756                 <binding>
757                         <command>dialog-close</command>
758                 </binding>
759         </button>
760
761         <nasal>
762                 <open>
763
764       var materials = { "Region-specific" : "Materials/regions/materials.xml",
765                         "Global" : "Materials/default/materials.xml",
766                         "Global alternative (DDS format)" : "Materials/dds/materials.xml" };
767
768
769                         gui.enable_widgets(cmdarg(), "shadows-debug", getprop("/sim/gui/devel-widgets"));
770                         props.globals.getNode("/sim/rendering/shaders/quality-level", 1).setAttribute("userarchive", 0);
771                         setprop("/sim/gui/frame-rate-throttled", (getprop("/sim/frame-rate-throttle-hz") > 0));
772
773                         var matfile = getprop("/sim/rendering/materials-file");
774                         foreach (var name; keys(materials)) {
775                           if (matfile == materials[name]) {
776           setprop("/sim/gui/dialogs/rendering/texture-set", name);
777                           }
778                         }
779
780       var vendor = getprop("/sim/rendering/gl-vendor");
781       if (vendor != nil) {
782         vendor = string.lc(vendor);
783         if (find("intel", vendor) != -1) {
784           setprop("/sim/gui/dialogs/rendering/shader-warning", 1);
785         } else {
786           setprop("/sim/gui/dialogs/rendering/shader-warning", 0);
787         }
788       }
789                 </open>
790         </nasal>
791 </PropertyList>