#643 rendering options dialog, "sky dome scattering" vs "shader quality"
[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         <group>
38                 <halign>center</halign>
39                 <layout>hbox</layout>
40
41                 <group>
42                         <layout>vbox</layout>
43
44                         <group>
45                                 <layout>hbox</layout>
46                                 <text>
47                                         <label>General</label>
48                                         <halign>left</halign>
49                                 </text>
50                                 <hrule>
51                                         <stretch>true</stretch>
52                                 </hrule>
53                         </group>
54
55                         <checkbox>
56                                 <halign>left</halign>
57                                 <label>Wireframe</label>
58                                 <name>wireframe</name>
59                                 <property>/sim/rendering/wireframe</property>
60                                 <binding>
61                                         <command>dialog-apply</command>
62                                         <object-name>wireframe</object-name>
63                                 </binding>
64                         </checkbox>
65
66                         <!--
67                         <group>
68                                 <layout>hbox</layout>
69                                 <text>
70                                 <label>Lighting</label>
71                                 <halign>left</halign>
72                                 </text>
73                                 <hrule>
74                                 <stretch>true</stretch>
75                                 </hrule>
76                         </group>
77
78                         <checkbox>
79                                 <halign>left</halign>
80                                 <label>Sun/Moon horizon effect</label>
81                                 <property>/sim/rendering/horizon-effect</property>
82                                 <binding>
83                                         <command>dialog-apply</command>
84                                 </binding>
85                         </checkbox>
86                         -->
87
88                         <checkbox>
89                                 <halign>left</halign>
90                                 <label>Use point sprites for runway lights (requires restart)</label>
91                                 <property>/sim/rendering/point-sprites</property>
92                                 <binding>
93                                         <command>dialog-apply</command>
94                                 </binding>
95                         </checkbox>
96
97                         <!--
98                         <checkbox>
99                                 <halign>left</halign>
100                                 <label>Enhanced runway lighting</label>
101                                 <property>/sim/rendering/enhanced-lighting</property>
102                                 <binding>
103                                         <command>dialog-apply</command>
104                                 </binding>
105                         </checkbox>
106
107                         <checkbox>
108                                 <halign>left</halign>
109                                 <label>Runway light distance attenuation</label>
110                                 <property>/sim/rendering/distance-attenuation</property>
111                                 <binding>
112                                         <command>dialog-apply</command>
113                                 </binding>
114                         </checkbox>
115
116                         <checkbox>
117                                 <halign>left</halign>
118                                 <label>Specular reflections on objects</label>
119                                 <property>/sim/rendering/specular-highlight</property>
120                                 <binding>
121                                         <command>dialog-apply</command>
122                                 </binding>
123                         </checkbox>
124                         -->
125
126                         <group>
127                                 <layout>hbox</layout>
128                                 <text>
129                                         <label>Objects</label>
130                                         <halign>left</halign>
131                                 </text>
132                                 <hrule>
133                                         <stretch>true</stretch>
134                                 </hrule>
135                         </group>
136
137                         <checkbox>
138                                 <halign>left</halign>
139                                 <label>Particles (smoke, dust, spray)</label>
140                                 <name>particles</name>
141                                 <property>/sim/rendering/particles</property>
142                                 <binding>
143                                         <command>dialog-apply</command>
144                                         <object-name>particles</object-name>
145                                 </binding>
146                         </checkbox>
147
148                         <checkbox>
149                                 <halign>left</halign>
150                                 <label>Precipitation</label>
151                                 <name>precipitation</name>
152                                 <property>/sim/rendering/precipitation-gui-enable</property>
153                                 <binding>
154                                         <command>dialog-apply</command>
155                                         <object-name>precipitation</object-name>
156                                 </binding>
157                         </checkbox>
158
159                         <!--
160
161                         <checkbox>
162                                 <halign>left</halign>
163                                 <label>Lightning</label>
164                                 <property>/sim/rendering/lightning-enable</property>
165                                 <binding>
166                                         <command>dialog-apply</command>
167                                 </binding>
168                         </checkbox>
169
170                         -->
171
172                         <checkbox>
173                                 <halign>left</halign>
174                                 <label>Random objects</label>
175                                 <name>random-objects</name>
176                                 <property>/sim/rendering/random-objects</property>
177                                 <binding>
178                                         <command>dialog-apply</command>
179                                         <object-name>random-objects</object-name>
180                                 </binding>
181                                 <binding>
182                                         <command>reinit</command>
183                                         <subsystem>tile-manager</subsystem>
184                                 </binding>
185                         </checkbox>
186
187                         <checkbox>
188                                 <halign>left</halign>
189                                 <label>Random vegetation</label>
190                                 <name>random-vegetation</name>
191                                 <property>/sim/rendering/random-vegetation</property>
192                                 <binding>
193                                         <command>dialog-apply</command>
194                                         <object-name>random-vegetation</object-name>
195                                 </binding>
196                                 <binding>
197                                         <command>reinit</command>
198                                         <subsystem>tile-manager</subsystem>
199                                 </binding>
200                         </checkbox>
201
202                         <group>
203                                 <layout>hbox</layout>
204                                 <halign>right</halign>
205                                 <text>
206                                         <label>Vegetation density</label>
207                                 </text>
208                                 <slider>
209                                         <name>vegetation-density</name>
210                                         <min>0</min>
211                                         <max>10.0</max>
212                                         <property>/sim/rendering/vegetation-density</property>
213                                         <binding>
214                                                 <command>dialog-apply</command>
215                                                 <object-name>vegetation-density</object-name>
216                                         </binding>
217                                 </slider>
218                                 <text>
219                                         <label>12345678</label>
220                                         <format>%.2f</format>
221                                         <live>true</live>
222                                         <property>/sim/rendering/vegetation-density</property>
223                                 </text>
224                         </group>
225
226                         <checkbox>
227                                 <halign>left</halign>
228                                 <label>Animated jetways</label>
229                                 <name>jetways</name>
230                                 <property>/nasal/jetways/enabled</property>
231                                 <binding>
232                                         <command>dialog-apply</command>
233                                         <object-name>jetways</object-name>
234                                 </binding>
235                         </checkbox>
236
237                         <group>
238                                 <layout>hbox</layout>
239                                 <text>
240                                         <label>Clouds</label>
241                                         <halign>left</halign>
242                                 </text>
243                                 <hrule>
244                                         <stretch>true</stretch>
245                                 </hrule>
246                         </group>
247
248                         <!--
249
250                         <checkbox>
251                                 <halign>left</halign>
252                                 <label>2D clouds</label>
253                                 <property>/sim/rendering/bump-mapping</property>
254                                 <binding>
255                                         <command>dialog-apply</command>
256                                 </binding>
257                         </checkbox>
258
259                         -->
260
261                         <checkbox>
262                                 <halign>left</halign>
263                                 <label>3D clouds</label>
264                                 <name>3d-clouds</name>
265                                 <property>/sim/rendering/clouds3d-enable</property>
266                                 <binding>
267                                         <command>dialog-apply</command>
268                                         <object-name>3d-clouds</object-name>
269                                 </binding>
270                         </checkbox>
271
272                         <group>
273                                 <layout>hbox</layout>
274                                 <halign>right</halign>
275                                 <text>
276                                         <label>Cloud density</label>
277                                         <enable>
278                                                 <property>/sim/rendering/clouds3d-enable</property>
279                                         </enable>
280                                 </text>
281                                 <slider>
282                                         <name>cloud-density</name>
283                                         <enable>
284                                                 <property>/sim/rendering/clouds3d-enable</property>
285                                         </enable>
286                                         <min>0</min>
287                                         <max>1.0</max>
288                                         <property>/sim/rendering/clouds3d-density</property>
289                                         <binding>
290                                                 <command>dialog-apply</command>
291                                                 <object-name>cloud-density</object-name>
292                                         </binding>
293                                         <binding>
294                                                 <command>property-toggle</command>
295                                                 <property>/sim/rendering/clouds3d-enable</property>
296                                         </binding>
297                                         <binding>
298                                                 <command>property-toggle</command>
299                                                 <property>/sim/rendering/clouds3d-enable</property>
300                                         </binding>
301                                 </slider>
302                                 <text>
303                                         <enable>
304                                                 <property>/sim/rendering/clouds3d-enable</property>
305                                         </enable>
306                                         <label>12345678</label>
307                                         <format>%.2f</format>
308                                         <live>true</live>
309                                         <property>/sim/rendering/clouds3d-density</property>
310                                 </text>
311                         </group>
312
313                         <group>
314                                 <layout>hbox</layout>
315                                 <halign>right</halign>
316                                 <text>
317                                         <label>Cloud visibility range</label>
318                                         <enable>
319                                                 <property>/sim/rendering/clouds3d-enable</property>
320                                         </enable>
321                                 </text>
322                                 <slider>
323                                         <name>cloud-vis-range</name>
324                                         <enable>
325                                                 <property>/sim/rendering/clouds3d-enable</property>
326                                         </enable>
327                                         <min>1000.0</min>
328                                         <max>45000.0</max>
329                                         <property>/sim/rendering/clouds3d-vis-range</property>
330                                         <binding>
331                                                 <command>dialog-apply</command>
332                                                 <object-name>cloud-vis-range</object-name>
333                                         </binding>
334                                 </slider>
335                                 <text>
336                                         <enable>
337                                                 <property>/sim/rendering/clouds3d-enable</property>
338                                         </enable>
339                                         <label>12345678</label>
340                                         <format>%.fm</format>
341                                         <live>true</live>
342                                         <property>/sim/rendering/clouds3d-vis-range</property>
343                                 </text>
344                         </group>
345
346                         <group>
347                                 <layout>vbox</layout>
348                                 <stretch>1</stretch>
349                         </group>
350
351                 </group>
352
353                 <vrule/>
354
355                 <group>
356                         <layout>vbox</layout>
357
358                         <group>
359                                 <layout>hbox</layout>
360                                 <text>
361                                         <label>Shader effects</label>
362                                         <halign>left</halign>
363                                 </text>
364                                 <hrule>
365                                         <stretch>true</stretch>
366                                 </hrule>
367                         </group>
368                         
369                         <group>
370                                 <layout>vbox</layout>
371                                 <padding>4</padding>
372                                 <text>
373                                         <padding>0</padding>
374                                         <label>This slider overrides custom settings as set in</label>
375                                         <halign>left</halign>
376                                 </text>
377                                 <text>
378                                         <padding>0</padding>
379                                         <label>the (advanced) Shader Options dialog.</label>
380                                         <halign>left</halign>
381                                 </text>
382                         </group>
383                         
384                         <group>
385                                 <layout>hbox</layout>
386
387                                 <text>
388                                         <label>Performance</label>
389                                 </text>
390                                 <slider>
391                                         <name>quality-level</name>
392                                         <min>0.0</min>
393                                         <max>5.0</max>
394                                         <step>1.0</step>
395                                         <fraction>0.17</fraction>
396                                         <property>/sim/rendering/shaders/quality-level</property>
397                                         <binding>
398                                                 <command>dialog-apply</command>
399                                                 <object-name>quality-level</object-name>
400                                         </binding>
401                                 </slider>
402                                 <text>
403                                         <label>Quality</label>
404                                 </text>
405                                 <text>
406                                         <label>12345678</label>
407                                         <format>(%1.0f)</format>
408                                         <live>true</live>
409                                         <property>/sim/rendering/shaders/quality-level</property>
410                                 </text>
411                         </group>
412
413                         <group>
414                                 <layout>hbox</layout>
415                                 <button>
416                                         <legend>Shader Options</legend>
417                                         <binding>
418                                                 <command>dialog-show</command>
419                                                 <dialog-name>shaders</dialog-name>
420                                         </binding>
421                                 </button>
422
423                                 <group>
424                                         <layout>vbox</layout>
425                                         <text>
426                                                 <visible>
427                                                         <not>
428                                                                 <property>/sim/rendering/shaders/quality-level</property>
429                                                         </not>
430                                                 </visible>
431                                                 <label>Adjust the slider </label>
432                                                 <halign>left</halign>
433                                                 <color>
434                                                         <red>1.0</red>
435                                                         <green>0.6</green>
436                                                         <blue>0.6</blue>
437                                                 </color>
438                                         </text>
439                                         <text>
440                                                 <visible>
441                                                         <not>
442                                                                 <property>/sim/rendering/shaders/quality-level</property>
443                                                         </not>
444                                                 </visible>
445                                                 <label>to enable shaders.</label>
446                                                 <halign>left</halign>
447                                                 <color>
448                                                         <red>1.0</red>
449                                                         <green>0.6</green>
450                                                         <blue>0.6</blue>
451                                                 </color>
452                                         </text>
453                                 </group>
454                         </group>
455
456                         <group>
457                                 <layout>hbox</layout>
458                                 <text>
459                                         <label>Experimental effects</label>
460                                         <halign>left</halign>
461                                         <color>
462                                                 <red>1.0</red>
463                                                 <green>0.6</green>
464                                                 <blue>0.6</blue>
465                                         </color>
466                                 </text>
467                                 <hrule>
468                                         <stretch>true</stretch>
469                                 </hrule>
470                         </group>
471
472                         <group>
473                                 <layout>vbox</layout>
474                                 <checkbox>
475                                         <halign>left</halign>
476                                         <label>Skydome scattering</label>
477                                         <name>skydome-scattering</name>
478                                         <property>/sim/rendering/shaders/skydome</property>
479                                         <binding>
480                                                 <command>dialog-apply</command>
481                                                 <object-name>skydome-scattering</object-name>
482                                         </binding>
483                                 </checkbox>
484                         </group>
485
486                         <group>
487                                 <layout>hbox</layout>
488                                 <halign>right</halign>
489                                 <text>
490                                         <label>Mie factor</label>
491                                         <enable>
492                                                 <property>/sim/rendering/shaders/skydome</property>
493                                         </enable>
494                                 </text>
495                                 <slider>
496                                         <name>mie-factor</name>
497                                         <enable>
498                                                 <property>/sim/rendering/shaders/skydome</property>
499                                         </enable>
500                                         <min>0.0</min>
501                                         <max>0.01</max>
502                                         <step>0.001</step>
503                                         <property>/sim/rendering/mie</property>
504                                         <binding>
505                                                 <command>dialog-apply</command>
506                                                 <object-name>mie-factor</object-name>
507                                         </binding>
508                                 </slider>
509                                 <text>
510                                         <enable>
511                                                 <property>/sim/rendering/shaders/skydome</property>
512                                         </enable>
513                                         <label>12345678</label>
514                                         <format>%.3f</format>
515                                         <live>true</live>
516                                         <property>/sim/rendering/mie</property>
517                                 </text>
518                         </group>
519
520                         <group>
521                                 <layout>hbox</layout>
522                                 <halign>right</halign>
523                                 <text>
524                                         <label>Rayleigh factor</label>
525                                         <enable>
526                                                 <property>/sim/rendering/shaders/skydome</property>
527                                         </enable>
528                                 </text>
529                                 <slider>
530                                         <name>rayleigh-factor</name>
531                                         <enable>
532                                                 <property>/sim/rendering/shaders/skydome</property>
533                                         </enable>
534                                         <min>0.0</min>
535                                         <max>0.001</max>
536                                         <step>0.0001</step>
537                                         <property>/sim/rendering/rayleigh</property>
538                                         <binding>
539                                                 <command>dialog-apply</command>
540                                                 <object-name>rayleigh-factor</object-name>
541                                         </binding>
542                                 </slider>
543                                 <text>
544                                         <enable>
545                                                 <property>/sim/rendering/shaders/skydome</property>
546                                         </enable>
547                                         <label>12345678</label>
548                                         <format>%.4f</format>
549                                         <live>true</live>
550                                         <property>/sim/rendering/rayleigh</property>
551                                 </text>
552                         </group>
553
554                         <group>
555                                 <layout>hbox</layout>
556                                 <halign>right</halign>
557                                 <text>
558                                         <label>Density factor</label>
559                                         <enable>
560                                                 <property>/sim/rendering/shaders/skydome</property>
561                                         </enable>
562                                 </text>
563                                 <slider>
564                                         <name>density-factor</name>
565                                         <enable>
566                                                 <property>/sim/rendering/shaders/skydome</property>
567                                         </enable>
568                                         <min>0.0</min>
569                                         <max>1.0</max>
570                                         <step>0.1</step>
571                                         <property>/sim/rendering/dome-density</property>
572                                         <binding>
573                                                 <command>dialog-apply</command>
574                                                 <object-name>density-factor</object-name>
575                                         </binding>
576                                 </slider>
577                                 <text>
578                                         <enable>
579                                                 <property>/sim/rendering/shaders/skydome</property>
580                                         </enable>
581                                         <label>12345678</label>
582                                         <format>%.1f</format>
583                                         <live>true</live>
584                                         <property>/sim/rendering/dome-density</property>
585                                 </text>
586                         </group>
587
588                         <empty>
589                                 <stretch>1</stretch>
590                         </empty>
591
592                 </group>
593         </group>
594
595         <hrule/>
596
597         <button>
598                 <legend>Close</legend>
599                 <default>true</default>
600                 <key>Esc</key>
601                 <binding>
602                         <command>dialog-close</command>
603                 </binding>
604         </button>
605
606         <nasal>
607                 <open>
608                         gui.enable_widgets(cmdarg(), "shadows-debug", getprop("/sim/gui/devel-widgets"));
609                         
610                         # overwrite custom shader settings on quality-slider input
611                         _setlistener("/sim/rendering/shaders/quality-level", func {
612                                 var qualityLevel = getprop("/sim/rendering/shaders/quality-level");
613                                 setprop("/sim/rendering/shaders/landmass",qualityLevel);
614                                 setprop("/sim/rendering/shaders/urban",qualityLevel);
615                                 setprop("/sim/rendering/shaders/water",qualityLevel);
616                                 if (qualityLevel >= 3.0){
617                                         qualityLevel = 3.0;
618                                 }
619                                 setprop("/sim/rendering/shaders/model",qualityLevel);
620                                 if (qualityLevel >= 1.0){
621                                         qualityLevel = 1.0;
622                                 }
623                                 setprop("/sim/rendering/shaders/contrails",qualityLevel);
624                                 setprop("/sim/rendering/shaders/crop",qualityLevel);
625                                 setprop("/sim/rendering/shaders/generic",qualityLevel);
626                                 setprop("/sim/rendering/shaders/transition",qualityLevel);
627                         });
628                 </open>
629         </nasal>
630 </PropertyList>