Merged next
Signed-off-by: fly <merspieler@airmail.cc>
5
AI/Aircraft/A333/A333-Eurowings.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<PropertyList include="A333-main.xml">
|
||||||
|
<texture-path>Textures/Eurowings</texture-path>
|
||||||
|
</PropertyList>
|
BIN
AI/Aircraft/A333/Textures/Eurowings/A333-tex.png
Normal file
After Width: | Height: | Size: 282 KiB |
|
@ -62,6 +62,9 @@
|
||||||
# <index n="0">9</index> <!-- Parking -->
|
# <index n="0">9</index> <!-- Parking -->
|
||||||
# </startup>
|
# </startup>
|
||||||
# </checklists>
|
# </checklists>
|
||||||
|
#
|
||||||
|
# If you are using <group>-tags in your checklist definition, you need
|
||||||
|
# to add one <group-index> per sequence.
|
||||||
#
|
#
|
||||||
# 3. Define a menu item that calls the complete_checklists function with
|
# 3. Define a menu item that calls the complete_checklists function with
|
||||||
# the name of the checklist sequence you would like to run.
|
# the name of the checklist sequence you would like to run.
|
||||||
|
@ -216,9 +219,15 @@ var complete = func(node, wait, from = nil)
|
||||||
{
|
{
|
||||||
var previous_condition = nil;
|
var previous_condition = nil;
|
||||||
var skipping = from != nil;
|
var skipping = from != nil;
|
||||||
|
|
||||||
|
if( node.getChild("group-index") != nil ){
|
||||||
|
var checklists_node = checklists.getChild("group", node.getChild("group-index").getIntValue());
|
||||||
|
} else {
|
||||||
|
var checklists_node = checklists;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var index; node.getChildren("index")) {
|
foreach (var index; node.getChildren("index")) {
|
||||||
var checklist = checklists.getChild("checklist", index.getValue());
|
var checklist = checklists_node.getChild("checklist", index.getValue());
|
||||||
foreach (var item; checklist.getChildren("item")) {
|
foreach (var item; checklist.getChildren("item")) {
|
||||||
var condition = item.getNode("condition");
|
var condition = item.getNode("condition");
|
||||||
if (skipping) {
|
if (skipping) {
|
||||||
|
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 119 KiB |
BIN
Airports/apt.dat.ws3.gz
Normal file
|
@ -10,6 +10,12 @@
|
||||||
<tile-size>128</tile-size>
|
<tile-size>128</tile-size>
|
||||||
<depth-slices>1</depth-slices>
|
<depth-slices>1</depth-slices>
|
||||||
<num-threads>1</num-threads>
|
<num-threads>1</num-threads>
|
||||||
|
<max-pointlights>
|
||||||
|
<property>/sim/rendering/dynamic-lighting/max-pointlights</property>
|
||||||
|
</max-pointlights>
|
||||||
|
<max-spotlights>
|
||||||
|
<property>/sim/rendering/dynamic-lighting/max-spotlights</property>
|
||||||
|
</max-spotlights>
|
||||||
</clustered-shading>
|
</clustered-shading>
|
||||||
<binding>
|
<binding>
|
||||||
<buffer>sun-shadowmap-atlas</buffer>
|
<buffer>sun-shadowmap-atlas</buffer>
|
||||||
|
|
|
@ -1,933 +0,0 @@
|
||||||
<html lang="en">
|
|
||||||
<!-- $Id$ -->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
||||||
<title>FlightGear FAQ</title>
|
|
||||||
<style type="text/css">
|
|
||||||
.indent { margin-left: 2em; margin-right: 1em; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1 align="center">FlightGear FAQ</h1>
|
|
||||||
<hr noshade>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Introduction</h2>
|
|
||||||
<p>Welcome to the FlightGear FAQ. Here you will find the answers to
|
|
||||||
some questions that are frequently asked on our mailing lists. If
|
|
||||||
you have a question that is not answered here, feel free to ask
|
|
||||||
us on our mailing lists. Enjoy</p>
|
|
||||||
|
|
||||||
<hr noshade>
|
|
||||||
<h2>
|
|
||||||
<a name="toc">Table of Contents</a>
|
|
||||||
</h2>
|
|
||||||
<h4>1 -
|
|
||||||
<a href="#1">The FAQ</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">1.1 -
|
|
||||||
<a href="#1.1">Where can I get the latest version of this FAQ?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">1.2 -
|
|
||||||
<a href="#1.2">Who do I contact if I have comments about this FAQ?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">1.3 -
|
|
||||||
<a href="#1.3">How old is this document?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">1.4 -
|
|
||||||
<a href="#1.4">What other important documentation should I read?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<h4>2 -
|
|
||||||
<a href="#2">Distribution</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">2.1 -
|
|
||||||
<a href="#2.1">Where can I get FlightGear?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.2 -
|
|
||||||
<a href="#2.2">What is the password for the FTP server?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.3 -
|
|
||||||
<a href="#2.3">Why won't the FTP server let me in with the right login info?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.4 -
|
|
||||||
<a href="#2.4">Where can I find the latest development source code?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.5 -
|
|
||||||
<a href="#2.5">What is SimGear, and why do I need it?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.6 -
|
|
||||||
<a href="#2.6">Where can I fly and where do I get the scenery?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.7 -
|
|
||||||
<a href="#2.7">Where can I get different 3D models for my plane?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.8 -
|
|
||||||
<a href="#2.8">How current is the data in FlightGear compared to the real world?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.9 -
|
|
||||||
<a href="#2.9">Where is the moving map?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">2.10 -
|
|
||||||
<a href="#2.10">Why don't you charge money for this?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<h4>3 -
|
|
||||||
<a href="#3">Compiling</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">3.1 -
|
|
||||||
<a href="#3.1">Why won't FlightGear compile?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">3.2 -
|
|
||||||
<a href="#3.2">I'm using RedHat 7, and ...?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<h4>4 -
|
|
||||||
<a href="#4">Configuring</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">4.1 -
|
|
||||||
<a href="#4.1">How do I install new scenery?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">4.2 -
|
|
||||||
<a href="#4.2">How do I setup my joystick(s)?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">4.3 -
|
|
||||||
<a href="#4.3">What format should my personal .fgfsrc file be in?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<h4>5 -
|
|
||||||
<a href="#5">Running</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">5.1 -
|
|
||||||
<a href="#5.1">Why do I get an error loading libopenal.so.0?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.2 -
|
|
||||||
<a href="#5.2">Why do I get "ssgInit called without a valid OpenGL context"?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.3 -
|
|
||||||
<a href="#5.3">What happened to the panel, keyboard, etc?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.4 -
|
|
||||||
<a href="#5.4">Why doesn't audio work properly under Irix?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.5 -
|
|
||||||
<a href="#5.5">Why is FlightGear so slow?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.6 -
|
|
||||||
<a href="#5.6">Why is my SGI machine so slow?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.7 -
|
|
||||||
<a href="#5.7">How do I see the frame rate?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.8 -
|
|
||||||
<a href="#5.8">Stuck upside down after "crash"?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">5.9 -
|
|
||||||
<a href="#5.9">Why does FlightGear die on startup saying "time zone reading failed"?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<h4>6 -
|
|
||||||
<a href="#6">Hacking</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">6.1 -
|
|
||||||
<a href="#6.1">What language is FlightGear written in?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.2 -
|
|
||||||
<a href="#6.2">How do I design a flight dynamics model for a new aircraft?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.3 -
|
|
||||||
<a href="#6.3">How do I import planes from Microsoft Flight Simulator?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.4 -
|
|
||||||
<a href="#6.4">How do I import BGL scenery from Microsoft Flight Simulator?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.5 -
|
|
||||||
<a href="#6.5">How do I design or modify a panel?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.6 -
|
|
||||||
<a href="#6.6">How do I place objects, like buildings, into FlightGear?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.7 -
|
|
||||||
<a href="#6.7">Where can I learn 3D programming and how do I get involved?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.8 -
|
|
||||||
<a href="#6.8">How do I add an airport?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">6.9 -
|
|
||||||
<a href="#6.9">How do I generate my own scenery?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<h4>7 -
|
|
||||||
<a href="#7">Flying</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">7.1 -
|
|
||||||
<a href="#7.1">Where can I learn about instrument flying and navigation?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">7.2 -
|
|
||||||
<a href="#7.2">What is the difference between Aileron and Rudder?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">7.3 -
|
|
||||||
<a href="#7.3">Is there support for multi-player flying?</a>
|
|
||||||
</div>
|
|
||||||
<div class="indent">7.4 -
|
|
||||||
<a href="#7.4">Is there support for any military scenarios like dog fighting or bomb dropping?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<h4>8 -
|
|
||||||
<a href="#8">FlightGear v0.7.6</a>
|
|
||||||
</h4>
|
|
||||||
<div class="indent">8.1 -
|
|
||||||
<a href="#8.1">Why do I get an error in viewer.cxx about `exit' being undeclared?</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="1">1 -
|
|
||||||
The FAQ</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="1.1">1.1 -
|
|
||||||
<u>Where can I get the latest version of this FAQ?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>
|
|
||||||
<a href="http://flightgear.org/Docs/FlightGear-FAQ.html">http://flightgear.org/Docs/FlightGear-FAQ.html</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="1.2">1.2 -
|
|
||||||
<u>Who do I contact if I have comments about this FAQ?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>First contact the author. If you get no response, send your
|
|
||||||
comments to the FlightGear-Users mailing list.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="1.3">1.3 -
|
|
||||||
<u>How old is this document?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>See the <i>About This Document</i> section at the end of the FAQ.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="1.4">1.4 -
|
|
||||||
<u>What other important documentation should I read?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>Most FlightGear documentation is linked to from
|
|
||||||
<a href="http://flightgear.org/Docs/">http://flightgear.org/Docs/</a>.
|
|
||||||
Definitely check out the <i>FlightGear Installation and Getting
|
|
||||||
Started</i> document available from the aforementioned location.</p>
|
|
||||||
<p>Also see the <code>FlightGear/docs-mini/</code> directory in the
|
|
||||||
source distribution for various other helpful documents.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="2">2 -
|
|
||||||
Distribution</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="2.1">2.1 -
|
|
||||||
<u>Where can I get FlightGear?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>The official download page is
|
|
||||||
<a href="http://flightgear.org/Downloads/">http://flightgear.org/Downloads/</a>.
|
|
||||||
Source code is our primary form of distribution, but precompiled
|
|
||||||
binaries are available for Windows and SGI IRIX.</p>
|
|
||||||
<p>Alternatively, FlightGear is packaged for Linux by SuSE, Debian
|
|
||||||
(sid), and Mandrake (Cooker) and can be directly installed through
|
|
||||||
those distributions.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.2">2.2 -
|
|
||||||
<u>What is the password for the FTP server?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>The FTP server uses standard anonymous login procedures. Login
|
|
||||||
with the username "anonymous" and use your email address as the
|
|
||||||
password. Most FTP clients and web browsers will do this
|
|
||||||
automatically for you.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.3">2.3 -
|
|
||||||
<u>Why won't the FTP server let me in with the right login info?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>This generally means that the server is at it's capacity. You
|
|
||||||
should receive a message saying such, but your FTP client may be
|
|
||||||
hiding it from you. Your options are to keep trying until a slot
|
|
||||||
opens up or try connecting to one of our <i>FTP</i> mirrors listed at
|
|
||||||
<a href="http://flightgear.org/mirrors.html">http://flightgear.org/mirrors.html</a>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.4">2.4 -
|
|
||||||
<u>Where can I find the latest development source code?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>The latest development code is available for everyone through our
|
|
||||||
CVS repository. See
|
|
||||||
<a href="http://flightgear.org/cvsResources/">http://flightgear.org/cvsResources/</a> for details.
|
|
||||||
</p>
|
|
||||||
<p>Otherwise, you can get relatively up-to-date snapshots of the
|
|
||||||
development tree at
|
|
||||||
<a href="ftp://flightgear.sourceforge.net/pub/flightgear/Devel/Snapshots/">ftp://flightgear.sourceforge.net/pub/flightgear/Devel/Snapshots/</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.5">2.5 -
|
|
||||||
<u>What is SimGear, and why do I need it?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>SimGear is a library of supporting code. SimGear is only needed
|
|
||||||
if you plan on compiling FlightGear -- it is not needed to run
|
|
||||||
precompiled binaries. For more information see
|
|
||||||
<a href="http://www.simgear.org/">http://www.simgear.org/</a>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.6">2.6 -
|
|
||||||
<u>Where can I fly and where do I get the scenery?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>While the base package only comes with scenery for the San Francisco
|
|
||||||
Bay area, you can currently fly just about anywhere in the world.
|
|
||||||
See the <i>"Additional Scenery"</i> section of
|
|
||||||
<a href="http://flightgear.org/Downloads/">http://flightgear.org/Downloads/</a>
|
|
||||||
for more information or go directly to our graphical downloader at
|
|
||||||
<a href="http://flightgear.org/Downloads/world-scenery.html">http://flightgear.org/Downloads/world-scenery.html</a>.
|
|
||||||
</p>
|
|
||||||
<p>Also visit our <i>"Places to Fly"</i> section of the website
|
|
||||||
(<a href="http://flightgear.org/Places/">http://flightgear.org/Places/</a>)
|
|
||||||
for some help navigating to some awesome locations.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.7">2.7 -
|
|
||||||
<u>Where can I get different 3D models for my plane?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>While we are working toward building our own 3D models, we have
|
|
||||||
been given permission by several people to convert their models (which
|
|
||||||
where originally intended for use with <i>Microsoft Flight
|
|
||||||
Simulator</i>) to use with FlightGear. See Wolfram's Hangar
|
|
||||||
(<a href="http://home.t-online.de/home/Wolfram.Kuss/">http://home.t-online.de/home/Wolfram.Kuss/</a>)
|
|
||||||
for a list of what we currently have available as well as
|
|
||||||
information on how to convert models yourself.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.8">2.8 -
|
|
||||||
<u>How current is the data in FlightGear compared to the real world?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>We use the same navaid and airport dataset that <i>X-Plane</i> uses. The
|
|
||||||
current dataset can be found in the <code>$FGROOT/Navaids/</code> and
|
|
||||||
<code>$FGROOT/Airports/</code> directories. If you have updates or
|
|
||||||
corrections to the dataset, see
|
|
||||||
<a href="http://flightgear.org/Docs/AirNav/AptNavFAQ.FlightGear.html">http://flightgear.org/Docs/AirNav/AptNavFAQ.FlightGear.html</a>
|
|
||||||
for instructions on contacting the database maintainer.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.9">2.9 -
|
|
||||||
<u>Where is the moving map?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>A popular moving map display is avaliable under a separate
|
|
||||||
project called <i>Atlas</i>. See
|
|
||||||
<a href="http://atlas.sf.net/">http://atlas.sf.net/</a>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="2.10">2.10 -
|
|
||||||
<u>Why don't you charge money for this?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>We could do that, since the initial download is about 25
|
|
||||||
megabytes. Especially for people who have to pay per-minute charges
|
|
||||||
for internet access, buying a CD is a convenient and possibly
|
|
||||||
cheaper option. Although we offer that service (see the website), we
|
|
||||||
encourage other groups to redistribute it for their users, especially
|
|
||||||
within an operating system distribution which makes installation even
|
|
||||||
faster and easier for new users.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="3">3 -
|
|
||||||
Compiling</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="3.1">3.1 -
|
|
||||||
<u>Why won't FlightGear compile?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>Well, that depends. First make sure you are using the appropriate
|
|
||||||
versions of FlightGear, SimGear, plib, zlib. If any of
|
|
||||||
the packages are out of sync with the others, compilation may fail.</p>
|
|
||||||
<p>The FlightGear <i>Downloads</i> page
|
|
||||||
(<a href="http://flightgear.org/Downloads/">http://flightgear.org/Downloads/</a>)
|
|
||||||
should tell you what versions you need if you are trying to compile
|
|
||||||
the latest stable release. If you are using a development snapshot,
|
|
||||||
make sure all three packages are up-to-date.</p>
|
|
||||||
<p>Also ensure that you have some implementation of OpenGL with glut
|
|
||||||
support with the appropriate header files. Linux users with nVidia
|
|
||||||
cards should make sure you have the latest drivers from nVidia. Other
|
|
||||||
Linux users make sure you have Mesa3D
|
|
||||||
(<a href="http://mesa3d.org/">http://mesa3d.org/</a>)
|
|
||||||
and your X server installed correctly. Windows users see
|
|
||||||
<a href="http://www.x-plane.com/SYSREQ/v5ibm.html">http://www.x-plane.com/SYSREQ/v5ibm.html</a>,
|
|
||||||
and Mac users see
|
|
||||||
<a href="http://www.x-plane.com/SYSREQ/v5mac.html">http://www.x-plane.com/SYSREQ/v5mac.html</a>.
|
|
||||||
</p>
|
|
||||||
<p>If your problems persist, subscribe to our FlightGear-Users mailing
|
|
||||||
list and let us know what problem you're having. See
|
|
||||||
<a href="http://flightgear.org/mail.html">http://flightgear.org/mail.html</a> for help with this.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="3.2">3.2 -
|
|
||||||
<u>I'm using RedHat 7, and ...?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>Update your gcc packages. See
|
|
||||||
<a href="http://redhat.com/errata/">http://redhat.com/errata/</a>
|
|
||||||
to fix it and
|
|
||||||
<a href="http://www.gnu.org/software/gcc/gcc-2.96.html">http://www.gnu.org/software/gcc/gcc-2.96.html</a>
|
|
||||||
for an explanation why.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="4">4 -
|
|
||||||
Configuring</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="4.1">4.1 -
|
|
||||||
<u>How do I install new scenery?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>The scenery archive files (ie. w100n30.tar.gz) should be untarred
|
|
||||||
into the <code>Scenery/Terrain</code> directory in your
|
|
||||||
<code>$FG_ROOT</code>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="4.2">4.2 -
|
|
||||||
<u>How do I setup my joystick(s)?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>FlightGear should come with a helpful program called <i>`fgjs`</i>
|
|
||||||
that can help configure your joystick. Run <i>`fgjs`</i> and then
|
|
||||||
copy the dot file it created into your home directory or add its
|
|
||||||
contents to your existing rc file.</p>
|
|
||||||
<p>Also, see the README.Joystick file located in the
|
|
||||||
<code>FlightGear/docs-mini/</code> directory of the source
|
|
||||||
distribution. This document is mirrored at
|
|
||||||
<a href="http://rockfish.net/fg/README.Joystick">http://rockfish.net/fg/README.Joystick</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="4.3">4.3 -
|
|
||||||
<u>What format should my personal .fgfsrc file be in?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>Your <code>.fgfsrc</code> file should simply be a list of
|
|
||||||
command-line options with one option per line. The file is <b>not</b>
|
|
||||||
an XML file.</p>
|
|
||||||
<p>If you would rather use an XML configuration file, you can add
|
|
||||||
something like the following in your <code>.fgfsrc</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>--config=/path/to/my/config.xml</code>
|
|
||||||
</p>
|
|
||||||
<p>Almost every option corresponds to a property, so you can choose
|
|
||||||
to use whichever method best suits your needs.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="5">5 -
|
|
||||||
Running</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="5.1">5.1 -
|
|
||||||
<u>Why do I get an error loading libopenal.so.0?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>With the default installation, libopenal.so.0 is installed into
|
|
||||||
<code>/usr/local/lib</code>. You need to ensure that that path is
|
|
||||||
listed in <code>/etc/ld.so.conf</code>, then run <i>`ldconfig`</i>as
|
|
||||||
root.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.2">5.2 -
|
|
||||||
<u>Why do I get "ssgInit called without a valid OpenGL context"?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>In short, your GL libraries are broken. So far only Red Hat 7.x
|
|
||||||
users have experienced this (see
|
|
||||||
<a href="http://www.redhat.com/bugzilla/show_bug.cgi?id=18867">http://www.redhat.com/bugzilla/show_bug.cgi?id=18867</a>).
|
|
||||||
The only solutions are possibly complicated ones: you can either
|
|
||||||
change distributions (most of us prefer Debian) or upgrade/downgrade
|
|
||||||
your Mesa libs.</p>
|
|
||||||
<p>
|
|
||||||
<i>
|
|
||||||
<u>Why do some other GL applications work though?</u>
|
|
||||||
</i> Well,
|
|
||||||
Steve Baker (Mr. PLIB) has explained this on the plib-users list
|
|
||||||
(<a href="http://www.geocrawler.com/lists/3/SourceForge/1867/0/6470648/">http://www.geocrawler.com/lists/3/SourceForge/1867/0/6470648/</a>).
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.3">5.3 -
|
|
||||||
<u>What happened to the panel, keyboard, etc?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>The problem is almost certainly that your base package is out of
|
|
||||||
sync with FlightGear. Many configurable parts of FlightGear are
|
|
||||||
defined in XML files contained in the base package.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.4">5.4 -
|
|
||||||
<u>Why doesn't audio work properly under Irix?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>FlightGear (as of June 2001) uses the Portable Libraries (PLIB)
|
|
||||||
for playing audio. The audio queue implementation of PLIB is far from
|
|
||||||
optimal (in fact it's just wrong). This seems to work on other
|
|
||||||
platforms quite well, but Irix expects things to be programmed
|
|
||||||
properly.</p>
|
|
||||||
<p>There has been discussion about using OpenAL
|
|
||||||
(<a href="http://www.openal.org/">http://www.openal.org/</a>)
|
|
||||||
for the next release of both PLIB and FlightGear. Tests show that
|
|
||||||
the OpenAL audio implementation does the job right, meaning that
|
|
||||||
these audio problems should be gone by then. In the mean time it is
|
|
||||||
best to disable audio on Irix completely (by adding --disable-sound
|
|
||||||
either on the command line or to your <code>$HOME/.fgfsrc</code>
|
|
||||||
file).</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.5">5.5 -
|
|
||||||
<u>Why is FlightGear so slow?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>FlightGear supports hardware acceleration, but it seems not to be
|
|
||||||
activated. Make sure you have OpenGL libraries installed and
|
|
||||||
configured properly and make sure you have the latest drivers for your
|
|
||||||
video card.</p>
|
|
||||||
<p>
|
|
||||||
<b>Linux users</b>: If you are an nVidia user, follow their
|
|
||||||
directions on getting your card working. For most other users, make
|
|
||||||
sure Mesa is installed property and ensure that you have the
|
|
||||||
appropriate kernel device drivers for your card. Most people (and
|
|
||||||
distributions) use modules for their video card device drivers; run
|
|
||||||
<i>`lsmod`</i> as root to see what modules are loaded. You should also
|
|
||||||
make sure that you are loading the appropriate modules in your
|
|
||||||
XF86Config and that your video device section is correct. Now try
|
|
||||||
running an OpenGL application (other than FlightGear) to see how it
|
|
||||||
performs. You can try the <i>gears</i> demo from Mesa or something
|
|
||||||
like <i>Quake3</i>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.6">5.6 -
|
|
||||||
<u>Why is my SGI machine so slow?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>First of all, one of the most common mistakes on SGI hardware is to
|
|
||||||
forget to specify --fog-fastest. On most SGI machines the EXP2 shading
|
|
||||||
model isn't hardware supported resulting in frame rates below 1 frame
|
|
||||||
per second (fps).</p>
|
|
||||||
<p>FlightGear makes extensive use of the OpenGL z-buffer feature,which
|
|
||||||
on most older SGI hardware is only supported in software. This means
|
|
||||||
that the CPU has to do all the z-buffer calculations in addition to the
|
|
||||||
other tasks FlightGear involves (flight dynamics, scenery tracking,
|
|
||||||
pushing commands into the graphics queue, etc). The following features
|
|
||||||
are software rendered on low-end SGI machines (like Indy and
|
|
||||||
Indigo):</p>
|
|
||||||
<ul>
|
|
||||||
<li>stencil and accumulation buffer</li>
|
|
||||||
<li>depth queuing and depth buffering</li>
|
|
||||||
<li>fogging, lighting, clipping and transforms</li>
|
|
||||||
<li>texturing</li>
|
|
||||||
</ul>
|
|
||||||
<p>This means that running FlightGear with the following options may not
|
|
||||||
even get the desired result:</p>
|
|
||||||
<p>
|
|
||||||
<code>./runfgfs --fog-disable --shading-flat --disable-skyblend \</code>
|
|
||||||
<br>
|
|
||||||
<code>--disable-textures --disable-clouds --disable-sound \</code>
|
|
||||||
<br>
|
|
||||||
<code>--disable-panel --enable-hud --disable-anti-alias-hud</code>
|
|
||||||
</p>
|
|
||||||
<p>I could even imagine that adding --enable-wireframe doesn't work on
|
|
||||||
these machines (I would be happy to be proven wrong though).</p>
|
|
||||||
<p>On a machine like O2 the following options give an acceptable
|
|
||||||
result:</p>
|
|
||||||
<code>./runfgfs --fog-fastest --disable-sound</code>
|
|
||||||
<p>Since I don't have access to other SGI hardware I can't tell which
|
|
||||||
options would be appropriate for your situation.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.7">5.7 -
|
|
||||||
<u>How do I see the frame rate?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>There are two ways. One way is to hide the panel without the HUD
|
|
||||||
showing. To hide the panel, use <i>Shift+P</i>; To make the HUD
|
|
||||||
disappear, use <i>H</i>. The second way is to use the alternative
|
|
||||||
HUD by <i>Shift+I</i> (Use <i>I</i> to switch back).</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.8">5.8 -
|
|
||||||
<u>Stuck upside down after "crash"?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>In his infinite wisdom the FlightGear Grand Master decided that
|
|
||||||
planes were to valuable to allow them to be destroyed by novice pilots
|
|
||||||
who seemed to crash a lot. The fact that nobody has bothered to model
|
|
||||||
crashes may have something to do with it too. :-)</p>
|
|
||||||
<p>The result of this as you have noticed is that with a little
|
|
||||||
practice an ingenuity you can trim the ship to fly inverted along the
|
|
||||||
ground.</p>
|
|
||||||
<p>The quick answer is to hit Ctrl+U (with the default key bindings)
|
|
||||||
to warp the plane up 1000ft.</p>
|
|
||||||
<p>For the stubborn people out there: The trick to learn is to roll
|
|
||||||
back to normal (non inverted) do this by nursing the elevator to get
|
|
||||||
to about 500 feet or so and use the ailerons to snap roll 180*.
|
|
||||||
This is all good avionics except for the plane not destroying
|
|
||||||
itself. Remember the controls work in reverse when you are inverted
|
|
||||||
and keep that airspeed up!!!</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="5.9">5.9 -
|
|
||||||
<u>Why does FlightGear die on startup saying "time zone reading failed"?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>This is probably caused by a line-ending problem in the timezone
|
|
||||||
files. Win32 users can resolve the problem by downloading a DOS to
|
|
||||||
UNIX conversion utility available at
|
|
||||||
<a href="http://www.nottingham.ac.uk/~eazdluf/d2u.zip">http://www.nottingham.ac.uk/~eazdluf/d2u.zip</a>.
|
|
||||||
Run as `<i>d2u *.tab</i>` from within the timezone directory to fix
|
|
||||||
your timezone files.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="6">6 -
|
|
||||||
Hacking</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="6.1">6.1 -
|
|
||||||
<u>What language is FlightGear written in?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>Mostly C++ with some supporting C code that's primary contained
|
|
||||||
within SimGear.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.2">6.2 -
|
|
||||||
<u>How do I design a flight dynamics model for a new aircraft?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>To define an aircraft for FlightGear's primary FDM (JSBSIM),
|
|
||||||
see <a href="http://jsbsim.sf.net/">http://jsbsim.sf.net/</a>.</p>
|
|
||||||
<p>If you want a simpler FDM to work with, try your hand at YASim,
|
|
||||||
an alternative FDM. For an guide on creating a YASim aircraft,
|
|
||||||
look in the FlightGear base package for
|
|
||||||
<code>Aircraft-yasim/README.yasim</code>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.3">6.3 -
|
|
||||||
<u>How do I import planes from Microsoft Flight Simulator?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>You can import the 3D model and textures, but the flight dynamics
|
|
||||||
(the .AIR file) must be completely redone for FlightGear. See
|
|
||||||
<a href="http://home.t-online.de/home/Wolfram.Kuss/">http://home.t-online.de/home/Wolfram.Kuss/</a>
|
|
||||||
for help importing .MDL files and textures.</p>
|
|
||||||
<p>If you wish to import a model made with gmax, you will need to
|
|
||||||
convert it to .MDL format using <i>Microsoft's MakeMDL SDK</i> which
|
|
||||||
is available at
|
|
||||||
<a href="http://zone.msn.com/flightsim/FS02DevDeskSDK08.asp">http://zone.msn.com/flightsim/FS02DevDeskSDK08.asp</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.4">6.4 -
|
|
||||||
<u>How do I import BGL scenery from Microsoft Flight Simulator?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>See
|
|
||||||
<a href="http://chiangt.virtualave.net/BGL/bgl_index.html">http://chiangt.virtualave.net/BGL/bgl_index.html</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.5">6.5 -
|
|
||||||
<u>How do I design or modify a panel?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>See the README.xmlpanel file located in the
|
|
||||||
<code>FlightGear/docs-mini/</code> directory of the source
|
|
||||||
distribution. This document is mirrored at
|
|
||||||
<a href="http://rockfish.net/fg/README.xmlpanel">http://rockfish.net/fg/README.xmlpanel</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.6">6.6 -
|
|
||||||
<u>How do I place objects, like buildings, into FlightGear?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>First, ensure that you have v0.7.7 or later, the scenery files
|
|
||||||
where you plan to place the object, the actual model, and the
|
|
||||||
longitude and latitude where you plan to place the object.</p>
|
|
||||||
<p>Now get the altitude for your point. If you don't want to
|
|
||||||
calculate this yourself, start FlightGear at your location and take
|
|
||||||
note of the altitude. Here's an example command:</p>
|
|
||||||
<p>
|
|
||||||
<code>fgfs --lat=45.50 --lon=-75.73 2>&1 | tee fgfs.log</code>
|
|
||||||
</p>
|
|
||||||
<p>The altitude is probably in feet, so divide the starting altitude
|
|
||||||
by 3.28.</p>
|
|
||||||
<p>Search the output log file for the first occurrence of the string
|
|
||||||
"Loading tile" and take note of the filename. In the above example,
|
|
||||||
the output line looks like:</p>
|
|
||||||
<p>
|
|
||||||
<code>Loading tile /usr/local/Scenery/w080n40/w076n45/1712601</code>
|
|
||||||
</p>
|
|
||||||
<p>Copy a 3D model in a format that Plib understands to the same
|
|
||||||
directory as the tile file. Edit the text file in that directory
|
|
||||||
consisting of the tile name with the extension ".stg". The file will
|
|
||||||
already exist if there is an airport on the tile; otherwise, you can
|
|
||||||
create it from scratch. In our example, the filename is:</p>
|
|
||||||
<p>
|
|
||||||
<code>/usr/local/Scenery/w080n40/w076n45/1712601.stg</code>
|
|
||||||
</p>
|
|
||||||
<p>At the end of the file, add a new entry for your object,
|
|
||||||
consisting of the word "OBJECT_STATIC" followed by the model name,
|
|
||||||
the longitude in degrees, the latitude in degrees, the altitude in
|
|
||||||
meters, and the heading in degrees. In our example the line looks
|
|
||||||
like:</p>
|
|
||||||
<p>
|
|
||||||
<code>OBJECT_STATIC Towerax.ac -75.73 45.40 60 0</code>
|
|
||||||
</p>
|
|
||||||
<p>Save the changes to the .stg file, restart FlightGear, and
|
|
||||||
enjoy.</p>
|
|
||||||
<p>NOTE: The above information was taken from the following mailing
|
|
||||||
list post:
|
|
||||||
<a href="http://www.geocrawler.com/archives/3/11854/2001/6/0/5991409/">http://www.geocrawler.com/archives/3/11854/2001/6/0/5991409/</a>.
|
|
||||||
See that page if this one doesn't make sense.</p>
|
|
||||||
<p>An alternative approach using PPE is described at
|
|
||||||
<a href="http://mail.flightgear.org/pipermail/flightgear-devel/2001-December/002239.html">http://mail.flightgear.org/pipermail/flightgear-devel/2001-December/002239.html</a>
|
|
||||||
by Norman Vine.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.7">6.7 -
|
|
||||||
<u>Where can I learn 3D programming and how do I get involved?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>Contributing to the 2D panel doesn't require any coding at all,
|
|
||||||
just a minimal knowledge of XML syntax (i.e. five minutes' worth)
|
|
||||||
and good skills with drawing and/or paint programs. Every instrument
|
|
||||||
on the current panel, with the partial exception of the magnetic
|
|
||||||
compass, is defined entirely in XML with no custom C++ code. If
|
|
||||||
you want to get started, take a look at John Check's excellent intro
|
|
||||||
(<a href="http://rockfish.net/fg/README.xmlpanel">http://rockfish.net/fg/README.xmlpanel</a>).
|
|
||||||
</p>
|
|
||||||
<p>Likewise, if you want to create a 3D cockpit for FlightGear, or to
|
|
||||||
create buildings, external aircraft models, etc., your help is
|
|
||||||
*desperately* needed. The only rule is to go easy on the triangles
|
|
||||||
-- a model with 50,000 triangles probably won't be usable in
|
|
||||||
FlightGear, and one with 5,000 triangles, only marginally. If you
|
|
||||||
can design a nice 3D cockpit interior for a Cessna 172 (for example)
|
|
||||||
in a 3D design program such as ac3D or ppe, we have coders who will
|
|
||||||
be happy to add the support code in the C++.</p>
|
|
||||||
<p>If, on the other hand, you really want to get your hands dirty
|
|
||||||
with C++ coding, you'll have to buy a good OpenGL book eventually.
|
|
||||||
However, FlightGear uses a high-level library, plib, that hides most
|
|
||||||
of the details of OpenGL. To get started with 3D C++ coding, you
|
|
||||||
can take a look at the plib documentation and learn only as much
|
|
||||||
OpenGL as you need, when you need it.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.8">6.8 -
|
|
||||||
<u>How do I add an airport?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>You can add your airport to the
|
|
||||||
<code>$FGROOT/Airports/default.apt.gz</code> file, but to get the
|
|
||||||
airport to show up visually, you will have to rebuild the scenery
|
|
||||||
around the airport. The format of the default.apt file is
|
|
||||||
documented at
|
|
||||||
<a href="http://flightgear.org/Docs/AirNav/AptNavFAQ.FlightGear.html">http://flightgear.org/Docs/AirNav/AptNavFAQ.FlightGear.html</a>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="6.9">6.9 -
|
|
||||||
<u>How do I generate my own scenery?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>Yes, though it can be a difficult task. FlightGear's scenery
|
|
||||||
generation is handled by a sister project, TerraGear. For more
|
|
||||||
details, see
|
|
||||||
<a href="http://wiki.flightgear.org/TerraGear">http://wiki.flightgear.org/TerraGear</a>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="7">7 -
|
|
||||||
Flying</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="7.1">7.1 -
|
|
||||||
<u>Where can I learn about instrument flying and navigation?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>
|
|
||||||
<a href="http://www.navfltsm.addr.com/">http://www.navfltsm.addr.com/</a>
|
|
||||||
is a very good site for learning techniques for navigation. Also see
|
|
||||||
<a href="http://www.monmouth.com/~jsd/how/">http://www.monmouth.com/~jsd/how/</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="7.2">7.2 -
|
|
||||||
<u>What is the difference between Aileron and Rudder?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>There is a bit of info on aileron vs. rudder here:
|
|
||||||
<a href="http://www.monmouth.com/~jsd/how/">http://www.monmouth.com/~jsd/how/</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="7.3">7.3 -
|
|
||||||
<u>Is there support for multi-player flying?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>We have an initial stab at this that is incomplete and only seems
|
|
||||||
to work under Linux. We'd love to find someone to pick up the
|
|
||||||
slack here and develop this further. Specifically, plib now has
|
|
||||||
some low level networking support for mult-player games. It would
|
|
||||||
also be nice to develop support for the DIS protocol.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<b>
|
|
||||||
<a name="7.4">7.4 -
|
|
||||||
<u>Is there support for any military scenarios like dog fighting or bomb dropping?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>No, not at this time. Most of our developers are primarily
|
|
||||||
interested and focused on civilian aviation. We aren't explicitly
|
|
||||||
excluding these features -- we just haven't had anyone who seriously
|
|
||||||
wanted to develop these areas.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<h2>
|
|
||||||
<a name="8">8 -
|
|
||||||
FlightGear v0.7.6</a>
|
|
||||||
</h2>
|
|
||||||
<b>
|
|
||||||
<a name="8.1">8.1 -
|
|
||||||
<u>Why do I get an error in viewer.cxx about `exit' being undeclared?</u>
|
|
||||||
</a>
|
|
||||||
</b>
|
|
||||||
<div class="indent">
|
|
||||||
<p>This error cropped up after the release of v0.7.6. To fix the
|
|
||||||
problem, add "<code>#include <stdlib.h></code>" to the top of viewer.cxx.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr noshade>
|
|
||||||
<a name="about">
|
|
||||||
<h2>About This Document</h2>
|
|
||||||
</a>
|
|
||||||
<b>FlightGear FAQ</b>
|
|
||||||
<br>$Revision$<br>$Date$<br>
|
|
||||||
<p>
|
|
||||||
<small>
|
|
||||||
This document generated from XML using
|
|
||||||
<a href="http://gingerall.com/charlie/ga/xml/p_sab.xml">Sablotron</a>.
|
|
||||||
</small>
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
<!-- vim: set ts=2 et nowrap: -->
|
|
||||||
</html>
|
|
|
@ -52,3 +52,6 @@ group. For example
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
See the c172p for an example of this in action (Aircraft/c172p/c172-checklists.xml).
|
See the c172p for an example of this in action (Aircraft/c172p/c172-checklists.xml).
|
||||||
|
|
||||||
|
Checklists can be automatically executed, for example to implement autostart. For
|
||||||
|
more information, have a look at Aircraft/Generic/autochecklist.nas.
|
||||||
|
|
|
@ -20,6 +20,7 @@ Contents ----------------------------------------------------------------------
|
||||||
3.8 RAILWAY_ROUGH / RAILWAY_DETAILED
|
3.8 RAILWAY_ROUGH / RAILWAY_DETAILED
|
||||||
3.9 BUILDING_LIST
|
3.9 BUILDING_LIST
|
||||||
3.10 TREE_LIST
|
3.10 TREE_LIST
|
||||||
|
3.11 LINEAR_FEATURE_LIST
|
||||||
|
|
||||||
4 model manager ("/models/model")
|
4 model manager ("/models/model")
|
||||||
4.1 static objects
|
4.1 static objects
|
||||||
|
@ -496,6 +497,37 @@ Where:
|
||||||
- X,Y,Z are the cartesian coordinates of the tree. +X is East, +Y is North
|
- X,Y,Z are the cartesian coordinates of the tree. +X is East, +Y is North
|
||||||
- A,B,C is optional and represents the normal of the underlying terrain. Used for shadows. Defaults to (0,0,1)
|
- A,B,C is optional and represents the normal of the underlying terrain. Used for shadows. Defaults to (0,0,1)
|
||||||
|
|
||||||
|
3.11 LINEAR_FEATURE_LIST
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Defines a file containing a set of linear feature that should be rendered using a
|
||||||
|
particular Material. E.g. Road, Waterways
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
LINEAR_FEATURE_LIST roads.txt.gz Road
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
|
||||||
|
LINEAR_FEATURE_LIST <filename> <material name>
|
||||||
|
|
||||||
|
Where:
|
||||||
|
- <filename> is the name of a file containing linear feature positions, may be a .gz file
|
||||||
|
- <material name> is the name of the material that will be used to render.
|
||||||
|
|
||||||
|
See README.materials for details on configuring the random vegetation parameters.
|
||||||
|
|
||||||
|
The referenced <filename> (in the example road.txt.gz) contains lines of the form
|
||||||
|
|
||||||
|
W ATTR A B C D lon0 lat0 lon1 lat1 lon2 lat2 lon3 lat4
|
||||||
|
|
||||||
|
Where:
|
||||||
|
|
||||||
|
- W is the feature width in meters.
|
||||||
|
- ATTR is an integer value used to store packed attributes (e.g. lighting, currenty unused)
|
||||||
|
- A,B,C,D are float values used to store attributes (currently unused)
|
||||||
|
- lonN, latN are lon/lat pairs on the center of the line feature. There must be at least two pairs
|
||||||
|
|
||||||
4 model manager ("/models/model") --------------------------------------------
|
4 model manager ("/models/model") --------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
20564
Docs/fschool_0.0.3.pdf
|
@ -13,12 +13,10 @@
|
||||||
<p class="noindent"><b>Basic help resources on
|
<p class="noindent"><b>Basic help resources on
|
||||||
<span class="ptmbi7t-x-x-120">FlightGear</span>:</b>
|
<span class="ptmbi7t-x-x-120">FlightGear</span>:</b>
|
||||||
|
|
||||||
<p class="indent"> <a href="getstart.pdf">The Complete User's Guide (PDF)</a>
|
<p class="indent"> <a href="http://flightgear.sourceforge.net/manual/next/">The complete manual (online)</a>
|
||||||
<p class="indent"> <a href="fschool_0.0.3.pdf">FlightGear Flight School (PDF)</a>
|
|
||||||
<p class="indent"> <a href="FGShortRef.html">Short reference including key codes</a>
|
<p class="indent"> <a href="FGShortRef.html">Short reference including key codes</a>
|
||||||
(also available as <a href="FGShortRef.pdf">PDF</a>)
|
(also available as <a href="FGShortRef.pdf">PDF</a>)
|
||||||
<p class="indent"> <a href="README.Joystick.html">Guide to joystick and keyboard configuration</a>
|
<p class="indent"> <a href="README.Joystick.html">Guide to joystick and keyboard configuration</a>
|
||||||
<p class="indent"> <a href="FlightGear-FAQ.html">Frequently asked questions </a>
|
|
||||||
|
|
||||||
<p class="noindent"><b>Information for power users:</b>
|
<p class="noindent"><b>Information for power users:</b>
|
||||||
<p class="indent"> <a href="README.local_weather.html">Guide for the Local Weather Package</a>
|
<p class="indent"> <a href="README.local_weather.html">Guide for the Local Weather Package</a>
|
||||||
|
|
BIN
Docs/readme.pdf
|
@ -166,10 +166,6 @@
|
||||||
<value type="float">6.0</value>
|
<value type="float">6.0</value>
|
||||||
<float-property>/sim/rendering/shaders/transition</float-property>
|
<float-property>/sim/rendering/shaders/transition</float-property>
|
||||||
</less-equal>
|
</less-equal>
|
||||||
<less-equal>
|
|
||||||
<value type="float">1.0</value>
|
|
||||||
<float-property>/sim/rendering/shaders/crop</float-property>
|
|
||||||
</less-equal>
|
|
||||||
</and>
|
</and>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
|
|
@ -154,8 +154,6 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/skydome</property>
|
<property>/sim/rendering/shaders/skydome</property>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/water</property>
|
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
<float-property>/sim/rendering/shaders/water</float-property>
|
<float-property>/sim/rendering/shaders/water</float-property>
|
||||||
|
@ -607,466 +605,4 @@
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/water</property>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<float-property>/sim/rendering/shaders/water</float-property>
|
|
||||||
</less-equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active>
|
|
||||||
<use>material/active</use>
|
|
||||||
</active>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<emissive>
|
|
||||||
<use>material/emissive</use>
|
|
||||||
</emissive>
|
|
||||||
<shininess>
|
|
||||||
<use>material/shininess</use>
|
|
||||||
</shininess>
|
|
||||||
<color-mode>
|
|
||||||
<use>material/color-mode</use>
|
|
||||||
</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active>
|
|
||||||
<use>blend/active</use>
|
|
||||||
</active>
|
|
||||||
<source>
|
|
||||||
<use>blend/source</use>
|
|
||||||
</source>
|
|
||||||
<destination>
|
|
||||||
<use>blend/destination</use>
|
|
||||||
</destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model>
|
|
||||||
<use>shade-model</use>
|
|
||||||
</shade-model>
|
|
||||||
<cull-face>
|
|
||||||
<use>cull-face</use>
|
|
||||||
</cull-face>
|
|
||||||
<rendering-hint>
|
|
||||||
<use>rendering-hint</use>
|
|
||||||
</rendering-hint>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[5]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[5]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[5]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[5]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[5]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[6]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>7</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[7]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[7]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[7]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[7]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[7]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[7]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader>Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader>Shaders/wake.vert</vertex-shader>
|
|
||||||
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/bowwave.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_normalmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_dudvmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection_grey</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sea_foam</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>alpha_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>bowwave_nmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">7</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>saturation</name>
|
|
||||||
<type>float</type>
|
|
||||||
<!--<value>0.4</value>-->
|
|
||||||
<value>
|
|
||||||
<use>saturation</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover0</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover0</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover1</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover1</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover2</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover2</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover3</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover3</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover4</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover4</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Status</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>status</use>
|
|
||||||
</value>
|
|
||||||
<!--<value type="int">0</value> -->
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Overcast</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>overcast</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindE</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windE</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindN</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windN</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>spd</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>speed-kt</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hdg</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>heading-deg</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Noise</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
<technique n="11"> <!-- FIXME: this technique number overlaps the one in model-default -->
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/water</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<vertex-shader>Shaders/water-orig.vert</vertex-shader>
|
|
||||||
<fragment-shader>Shaders/water-orig.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>texture</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -69,6 +69,8 @@
|
||||||
<wrap-s>clamp</wrap-s>
|
<wrap-s>clamp</wrap-s>
|
||||||
<wrap-t>clamp</wrap-t>
|
<wrap-t>clamp</wrap-t>
|
||||||
</texture>
|
</texture>
|
||||||
|
<!-- Add the following line to enable snow: -->
|
||||||
|
<snow-enabled>1</snow-enabled>
|
||||||
<!--Ambient correction -->
|
<!--Ambient correction -->
|
||||||
<ambient-correction type="float"> 0.0 </ambient-correction>
|
<ambient-correction type="float"> 0.0 </ambient-correction>
|
||||||
<dirt-enabled type="int"> 0 </dirt-enabled>
|
<dirt-enabled type="int"> 0 </dirt-enabled>
|
||||||
|
@ -120,7 +122,6 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/skydome</property>
|
<property>/sim/rendering/shaders/skydome</property>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/model</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
@ -227,177 +228,6 @@
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<technique n="7">
|
|
||||||
<!-- Model and Rembrandt -->
|
|
||||||
<pass>
|
|
||||||
<material>
|
|
||||||
<active>true</active>
|
|
||||||
<color-mode-uniform>1</color-mode-uniform>
|
|
||||||
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
|
|
||||||
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
|
||||||
<specular type="vec4d">0.0 0.0 0.0 1.0</specular>
|
|
||||||
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
|
|
||||||
<shininess>0.1</shininess>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
|
||||||
</material>
|
|
||||||
<texture-unit n="4">
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program n="0">
|
|
||||||
<vertex-shader n="0">Shaders/building-ubershader.vert</vertex-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>instancePosition</name>
|
|
||||||
<index>10</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>instanceScale</name>
|
|
||||||
<index>11</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>attrib1</name>
|
|
||||||
<index>12</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>attrib2</name>
|
|
||||||
<index>13</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<!-- Model shader, quality > 0 -->
|
|
||||||
<pass>
|
|
||||||
<material>
|
|
||||||
<active>true</active>
|
|
||||||
<color-mode-uniform>1</color-mode-uniform>
|
|
||||||
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
|
|
||||||
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
|
||||||
<specular type="vec4d">0.0 0.0 0.0 1.0</specular>
|
|
||||||
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
|
|
||||||
<shininess>0.1</shininess>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
|
||||||
</material>
|
|
||||||
<texture-unit n="4">
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program n="0">
|
|
||||||
<vertex-shader n="0">Shaders/building-ubershader.vert</vertex-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>instancePosition</name>
|
|
||||||
<index>10</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>instanceScale</name>
|
|
||||||
<index>11</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>attrib1</name>
|
|
||||||
<index>12</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>attrib2</name>
|
|
||||||
<index>13</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
<technique n="10">
|
|
||||||
<!-- Base Rembrandt -->
|
|
||||||
<pass>
|
|
||||||
<material>
|
|
||||||
<active>true</active>
|
|
||||||
<color-mode-uniform>1</color-mode-uniform>
|
|
||||||
<ambient type="vec4d">0.6 0.6 0.6 1.0</ambient>
|
|
||||||
<diffuse type="vec4d">1.0 1.0 1.0 1.0</diffuse>
|
|
||||||
<specular type="vec4d">0.0 0.0 0.0 1.0</specular>
|
|
||||||
<emissive type="vec4d">0.02 0.02 0.02 1.0</emissive>
|
|
||||||
<shininess>0.1</shininess>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
<color-mode-uniform>ambient-and-diffuse</color-mode-uniform>
|
|
||||||
</material>
|
|
||||||
<texture-unit n="4">
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program n="0">
|
|
||||||
<vertex-shader n="0">Shaders/building-ubershader.vert</vertex-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>instancePosition</name>
|
|
||||||
<index>10</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>instanceScale</name>
|
|
||||||
<index>11</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>attrib1</name>
|
|
||||||
<index>12</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>attrib2</name>
|
|
||||||
<index>13</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
<technique n="11">
|
<technique n="11">
|
||||||
<pass>
|
<pass>
|
||||||
<vertex-program-two-side>
|
<vertex-program-two-side>
|
||||||
|
|
|
@ -1,99 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Bump and specular effect
|
<!--
|
||||||
parameters :
|
Legacy Effect.
|
||||||
texture[0] -> colormap
|
It's kept for backwards compatibility and should not be used on new projects.
|
||||||
texture[2] -> normal map + specularity in alpha channel
|
|
||||||
|
|
||||||
eg :
|
|
||||||
in model.xml :
|
|
||||||
<effect>
|
|
||||||
<inherits-from>Aircraft/A320/Models/Effects/bumpspec</inherits-from>
|
|
||||||
<object-name>Fuselage</object-name>
|
|
||||||
</effect>
|
|
||||||
|
|
||||||
in Aircraft/A320/Models/Effects/a320_bumpspec.eff ( or whatever, private to the model )
|
|
||||||
|
|
||||||
<PropertyList>
|
|
||||||
<name>Aircraft/A320/Models/Effects/a320_bumpspec</name>
|
|
||||||
<inherits-from>Effects/bumpspec</inherits-from>
|
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Aircraft/A320/Models/Effects/textures/a320_normals.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
|
||||||
-->
|
-->
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/bumpspec</name>
|
<name>Effects/bumpspec</name>
|
||||||
<inherits-from>Effects/model-default</inherits-from>
|
<inherits-from>Effects/model-default</inherits-from>
|
||||||
<generate>
|
|
||||||
<tangent type="int">6</tangent>
|
|
||||||
<binormal type="int">7</binormal>
|
|
||||||
</generate>
|
|
||||||
<technique n="11"> <!-- This number should be the same than the second technique in model-default -->
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/model</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image><use>texture[0]/image</use></image>
|
|
||||||
<type><use>texture[0]/type</use></type>
|
|
||||||
<filter><use>texture[0]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format><use>texture[0]/internal-format</use></internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image><use>texture[2]/image</use></image>
|
|
||||||
<type><use>texture[2]/type</use></type>
|
|
||||||
<filter><use>texture[2]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format><use>texture[2]/internal-format</use></internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<vertex-shader n="1">Shaders/bumpspec.vert</vertex-shader>
|
|
||||||
<fragment-shader n="1">Shaders/bumpspec.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>tex_color</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>tex_normal</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/cityLM</name>
|
<name>Effects/cityLM</name>
|
||||||
<inherits-from>/Effects/model-combined-deferred</inherits-from>
|
<inherits-from>Effects/model-combined-deferred</inherits-from>
|
||||||
<parameters>
|
<parameters>
|
||||||
<!-- Light Map -->
|
<!-- Light Map -->
|
||||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||||
|
|
136
Effects/crop.eff
|
@ -2,140 +2,4 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/crop</name>
|
<name>Effects/crop</name>
|
||||||
<inherits-from>Effects/terrain-default</inherits-from>
|
<inherits-from>Effects/terrain-default</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/crop.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/crop-colors.png</image>
|
|
||||||
<type>1d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>mirror</wrap-s>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<snow-level><use>/environment/snow-level-m</use></snow-level>
|
|
||||||
</parameters>
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/crop</property>
|
|
||||||
<equal>
|
|
||||||
<value type="float">0.0</value>
|
|
||||||
<float-property>/sim/rendering/photoscenery/enabled</float-property>
|
|
||||||
</equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<!-- Use material values that are either inherited from the
|
|
||||||
terrain-default effect or supplied by an effect derived
|
|
||||||
from this one e.g., one created in the materials library. -->
|
|
||||||
<material>
|
|
||||||
<ambient><use>material/ambient</use></ambient>
|
|
||||||
<diffuse><use>material/diffuse</use></diffuse>
|
|
||||||
<specular><use>material/specular</use></specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend><use>transparent</use></blend>
|
|
||||||
<alpha-test><use>transparent</use></alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number><use>render-bin/bin-number</use></bin-number>
|
|
||||||
<bin-name><use>render-bin/bin-name</use></bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image><use>texture[2]/image</use></image>
|
|
||||||
<type><use>texture[2]/type</use></type>
|
|
||||||
<filter><use>texture[2]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<type><use>texture[3]/type</use></type>
|
|
||||||
<image><use>texture[3]/image</use></image>
|
|
||||||
<filter><use>texture[3]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<vertex-shader n="1">Shaders/crop.vert</vertex-shader>
|
|
||||||
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/crop.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>NoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>SampleTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>ColorsTex</name>
|
|
||||||
<type>sampler-1d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>snowlevel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>snow-level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -2,22 +2,4 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/cropgrass</name>
|
<name>Effects/cropgrass</name>
|
||||||
<inherits-from>Effects/crop</inherits-from>
|
<inherits-from>Effects/crop</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/cropgrass.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/cropgrass-colors.png</image>
|
|
||||||
<type>1d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>mirror</wrap-s>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<snow-level><use>/environment/snow-level-m</use></snow-level>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -327,248 +327,4 @@
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/generic</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active>
|
|
||||||
<use>material/active</use>
|
|
||||||
</active>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<emissive>
|
|
||||||
<use>material/emissive</use>
|
|
||||||
</emissive>
|
|
||||||
<shininess>
|
|
||||||
<use>material/shininess</use>
|
|
||||||
</shininess>
|
|
||||||
<color-mode>
|
|
||||||
<use>material/color-mode</use>
|
|
||||||
</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active>
|
|
||||||
<use>blend/active</use>
|
|
||||||
</active>
|
|
||||||
<source>
|
|
||||||
<use>blend/source</use>
|
|
||||||
</source>
|
|
||||||
<destination>
|
|
||||||
<use>blend/destination</use>
|
|
||||||
</destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model>
|
|
||||||
<use>shade-model</use>
|
|
||||||
</shade-model>
|
|
||||||
<cull-face>
|
|
||||||
<use>cull-face</use>
|
|
||||||
</cull-face>
|
|
||||||
<rendering-hint>
|
|
||||||
<use>rendering-hint</use>
|
|
||||||
</rendering-hint>
|
|
||||||
<texture-unit>
|
|
||||||
<!-- The texture unit is always active because the shaders expect
|
|
||||||
that. -->
|
|
||||||
<unit>0</unit>
|
|
||||||
<!-- If there is a texture, the type in the derived effect
|
|
||||||
will be "2d". -->
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<!--
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
-->
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<vertex-program-two-side>
|
|
||||||
<use>vertex-program-two-side</use>
|
|
||||||
</vertex-program-two-side>
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/flutter.vert</vertex-shader>
|
|
||||||
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/default.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<!--<uniform>
|
|
||||||
<name>texture</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>-->
|
|
||||||
<uniform>
|
|
||||||
<name>colorMode</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>material/color-mode-uniform</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- uniform> unused?
|
|
||||||
<name>WindSpeed</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>wind-speed</use>
|
|
||||||
</value>
|
|
||||||
</uniform-->
|
|
||||||
<uniform>
|
|
||||||
<name>Offset</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>offset</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>AmpFactor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>amplitude-factor</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Noise</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindE</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windE</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindN</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windN</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>spd</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>speed-kt</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hdg</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>heading-deg</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -2,305 +2,4 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/forest</name>
|
<name>Effects/forest</name>
|
||||||
<inherits-from>Effects/terrain-default</inherits-from>
|
<inherits-from>Effects/terrain-default</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/rock.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
<type>2d</type>
|
|
||||||
</texture>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/forest-colors.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>mirror</wrap-s>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
<type>1d</type>
|
|
||||||
</texture>
|
|
||||||
<texture n="4">
|
|
||||||
<image>Textures/Terrain/forest.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
<type>2d</type>
|
|
||||||
</texture>
|
|
||||||
<texture n="5">
|
|
||||||
<image>Textures/Terrain/forest-relief.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
<type>2d</type>
|
|
||||||
</texture>
|
|
||||||
<snow-level><use>/environment/snow-level-m</use></snow-level>
|
|
||||||
<depth-factor type="float">0.04</depth-factor>
|
|
||||||
<canopy-height type="float">15.0</canopy-height>
|
|
||||||
<quality-level><use>/sim/rendering/shaders/transition</use></quality-level>
|
|
||||||
|
|
||||||
<!-- sets the season color -->
|
|
||||||
<season-red type="float">0.12</season-red>
|
|
||||||
<season-green type="float">0.86</season-green>
|
|
||||||
<season-blue type="float">0.22</season-blue>
|
|
||||||
<!-- end season color -->
|
|
||||||
<!--fog include-->
|
|
||||||
<visibility>
|
|
||||||
<use>/environment/ground-visibility-m</use>
|
|
||||||
</visibility>
|
|
||||||
<avisibility>
|
|
||||||
<use>/environment/visibility-m</use>
|
|
||||||
</avisibility>
|
|
||||||
<lthickness>
|
|
||||||
<use>/environment/ground-haze-thickness-m</use>
|
|
||||||
</lthickness>
|
|
||||||
<scattering>
|
|
||||||
<use>/rendering/scene/scattering</use>
|
|
||||||
</scattering>
|
|
||||||
<terminator>
|
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
|
||||||
</terminator>
|
|
||||||
<fogtype>
|
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
|
||||||
</fogtype>
|
|
||||||
<!-- END fog include -->
|
|
||||||
|
|
||||||
</parameters>
|
|
||||||
<generate>
|
|
||||||
<tangent type="int">6</tangent>
|
|
||||||
<binormal type="int">7</binormal>
|
|
||||||
</generate>
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/transition</property>
|
|
||||||
<equal>
|
|
||||||
<value type="float">0.0</value>
|
|
||||||
<float-property>/sim/rendering/photoscenery/enabled</float-property>
|
|
||||||
</equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<!-- Use material values that are either inherited from the
|
|
||||||
terrain-default effect or supplied by an effect derived
|
|
||||||
from this one e.g., one created in the materials library. -->
|
|
||||||
<material>
|
|
||||||
<ambient><use>material/ambient</use></ambient>
|
|
||||||
<diffuse><use>material/diffuse</use></diffuse>
|
|
||||||
<specular><use>material/specular</use></specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend><use>transparent</use></blend>
|
|
||||||
<alpha-test><use>transparent</use></alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number><use>render-bin/bin-number</use></bin-number>
|
|
||||||
<bin-name><use>render-bin/bin-name</use></bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<type><use>texture[2]/type</use></type>
|
|
||||||
<image><use>texture[2]/image</use></image>
|
|
||||||
<filter><use>texture[2]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<type><use>texture[3]/type</use></type>
|
|
||||||
<image><use>texture[3]/image</use></image>
|
|
||||||
<filter><use>texture[3]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<type><use>texture[4]/type</use></type>
|
|
||||||
<image><use>texture[4]/image</use></image>
|
|
||||||
<filter><use>texture[4]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<type><use>texture[5]/type</use></type>
|
|
||||||
<image><use>texture[5]/image</use></image>
|
|
||||||
<filter><use>texture[5]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[5]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[5]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[5]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/forest.vert</vertex-shader>
|
|
||||||
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/forest.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>NoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>SampleTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>SampleTex2</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>ColorsTex</name>
|
|
||||||
<type>sampler-1d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>depth_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>depth-factor</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>snowlevel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>snow-level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>quality_level</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>quality-level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>red</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-red</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>green</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-green</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>blue</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-blue</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>alpha</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>0.0</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -2,301 +2,4 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/glacier</name>
|
<name>Effects/glacier</name>
|
||||||
<inherits-from>Effects/terrain-default</inherits-from>
|
<inherits-from>Effects/terrain-default</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/rock.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/forest-colors.png</image>
|
|
||||||
<type>1d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>mirror</wrap-s>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="4">
|
|
||||||
<image>Textures/Terrain/forest.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="5">
|
|
||||||
<image>Textures/Terrain/forest-relief.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<snow-level><use>/environment/snow-level-m</use></snow-level>
|
|
||||||
<depth-factor type="float">0.01</depth-factor>
|
|
||||||
<canopy-height type="float">15.0</canopy-height>
|
|
||||||
<quality-level><use>/sim/rendering/shaders/transition</use></quality-level>
|
|
||||||
|
|
||||||
<!-- sets the season color -->
|
|
||||||
<season-red type="float">0.12</season-red>
|
|
||||||
<season-green type="float">0.86</season-green>
|
|
||||||
<season-blue type="float">0.22</season-blue>
|
|
||||||
<!-- end season color -->
|
|
||||||
<!--fog include-->
|
|
||||||
<visibility>
|
|
||||||
<use>/environment/ground-visibility-m</use>
|
|
||||||
</visibility>
|
|
||||||
<avisibility>
|
|
||||||
<use>/environment/visibility-m</use>
|
|
||||||
</avisibility>
|
|
||||||
<lthickness>
|
|
||||||
<use>/environment/ground-haze-thickness-m</use>
|
|
||||||
</lthickness>
|
|
||||||
<scattering>
|
|
||||||
<use>/rendering/scene/scattering</use>
|
|
||||||
</scattering>
|
|
||||||
<terminator>
|
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
|
||||||
</terminator>
|
|
||||||
<fogtype>
|
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
|
||||||
</fogtype>
|
|
||||||
<!-- END fog include -->
|
|
||||||
|
|
||||||
</parameters>
|
|
||||||
<generate>
|
|
||||||
<tangent type="int">6</tangent>
|
|
||||||
<binormal type="int">7</binormal>
|
|
||||||
</generate>
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/transition</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<!-- Use material values that are either inherited from the
|
|
||||||
terrain-default effect or supplied by an effect derived
|
|
||||||
from this one e.g., one created in the materials library. -->
|
|
||||||
<material>
|
|
||||||
<ambient><use>material/ambient</use></ambient>
|
|
||||||
<diffuse><use>material/diffuse</use></diffuse>
|
|
||||||
<specular><use>material/specular</use></specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend><use>transparent</use></blend>
|
|
||||||
<alpha-test><use>transparent</use></alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number><use>render-bin/bin-number</use></bin-number>
|
|
||||||
<bin-name><use>render-bin/bin-name</use></bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image><use>texture[2]/image</use></image>
|
|
||||||
<type><use>texture[2]/type</use></type>
|
|
||||||
<filter><use>texture[2]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<image><use>texture[3]/image</use></image>
|
|
||||||
<type><use>texture[3]/type</use></type>
|
|
||||||
<filter><use>texture[3]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image><use>texture[4]/image</use></image>
|
|
||||||
<type><use>texture[4]/type</use></type>
|
|
||||||
<filter><use>texture[4]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<image><use>texture[5]/image</use></image>
|
|
||||||
<type><use>texture[5]/type</use></type>
|
|
||||||
<filter><use>texture[5]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[5]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[5]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[5]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/forest.vert</vertex-shader>
|
|
||||||
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/forest.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>NoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>SampleTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>SampleTex2</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>ColorsTex</name>
|
|
||||||
<type>sampler-1d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>depth_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>depth-factor</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>snowlevel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>snow-level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>quality_level</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>quality-level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>red</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-red</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>green</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-green</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>blue</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-blue</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>alpha</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>0.0</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -2,301 +2,4 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/herbtundra</name>
|
<name>Effects/herbtundra</name>
|
||||||
<inherits-from>Effects/terrain-default</inherits-from>
|
<inherits-from>Effects/terrain-default</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/rock.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/forest-colors.png</image>
|
|
||||||
<type>1d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>mirror</wrap-s>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="4">
|
|
||||||
<image>Textures/Terrain/forest.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="5">
|
|
||||||
<image>Textures/Terrain/forest-relief.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<snow-level><use>/environment/snow-level-m</use></snow-level>
|
|
||||||
<depth-factor type="float">0.01</depth-factor>
|
|
||||||
<canopy-height type="float">15.0</canopy-height>
|
|
||||||
|
|
||||||
<!-- sets the season color -->
|
|
||||||
<season-red type="float">0.12</season-red>
|
|
||||||
<season-green type="float">0.86</season-green>
|
|
||||||
<season-blue type="float">0.22</season-blue>
|
|
||||||
<!-- end season color -->
|
|
||||||
|
|
||||||
<!--fog include-->
|
|
||||||
<visibility>
|
|
||||||
<use>/environment/ground-visibility-m</use>
|
|
||||||
</visibility>
|
|
||||||
<avisibility>
|
|
||||||
<use>/environment/visibility-m</use>
|
|
||||||
</avisibility>
|
|
||||||
<lthickness>
|
|
||||||
<use>/environment/ground-haze-thickness-m</use>
|
|
||||||
</lthickness>
|
|
||||||
<scattering>
|
|
||||||
<use>/rendering/scene/scattering</use>
|
|
||||||
</scattering>
|
|
||||||
<terminator>
|
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
|
||||||
</terminator>
|
|
||||||
<fogtype>
|
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
|
||||||
</fogtype>
|
|
||||||
<!-- END fog include -->
|
|
||||||
|
|
||||||
<quality-level><use>/sim/rendering/shaders/transition</use></quality-level>
|
|
||||||
</parameters>
|
|
||||||
<generate>
|
|
||||||
<tangent type="int">6</tangent>
|
|
||||||
<binormal type="int">7</binormal>
|
|
||||||
</generate>
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/transition</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<!-- Use material values that are either inherited from the
|
|
||||||
terrain-default effect or supplied by an effect derived
|
|
||||||
from this one e.g., one created in the materials library. -->
|
|
||||||
<material>
|
|
||||||
<ambient><use>material/ambient</use></ambient>
|
|
||||||
<diffuse><use>material/diffuse</use></diffuse>
|
|
||||||
<specular><use>material/specular</use></specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend><use>transparent</use></blend>
|
|
||||||
<alpha-test><use>transparent</use></alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number><use>render-bin/bin-number</use></bin-number>
|
|
||||||
<bin-name><use>render-bin/bin-name</use></bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image><use>texture[2]/image</use></image>
|
|
||||||
<type><use>texture[2]/type</use></type>
|
|
||||||
<filter><use>texture[2]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[2]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[2]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<image><use>texture[3]/image</use></image>
|
|
||||||
<type><use>texture[3]/type</use></type>
|
|
||||||
<filter><use>texture[3]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[3]/wrap-s</use></wrap-s>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image><use>texture[4]/image</use></image>
|
|
||||||
<type><use>texture[4]/type</use></type>
|
|
||||||
<filter><use>texture[4]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[4]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[4]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<image><use>texture[5]/image</use></image>
|
|
||||||
<type><use>texture[5]/type</use></type>
|
|
||||||
<filter><use>texture[5]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[5]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[5]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[5]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<vertex-shader n="1">Shaders/forest.vert</vertex-shader>
|
|
||||||
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/forest.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>NoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>SampleTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>SampleTex2</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>ColorsTex</name>
|
|
||||||
<type>sampler-1d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>depth_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>depth-factor</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>snowlevel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>snow-level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>quality_level</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>quality-level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>red</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-red</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>green</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-green</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>blue</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>season-blue</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>alpha</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>0.0</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -2,7 +2,4 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/landmass-nowood</name>
|
<name>Effects/landmass-nowood</name>
|
||||||
<inherits-from>Effects/landmass</inherits-from>
|
<inherits-from>Effects/landmass</inherits-from>
|
||||||
<parameters>
|
|
||||||
<canopy-height type="float">0.0</canopy-height>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -2,15 +2,4 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/landmass-scrub</name>
|
<name>Effects/landmass-scrub</name>
|
||||||
<inherits-from>Effects/landmass</inherits-from>
|
<inherits-from>Effects/landmass</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/shrubcover-relief.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<canopy-height type="float">1.0</canopy-height>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,582 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/landmass</name>
|
<name>Effects/landmass</name>
|
||||||
<inherits-from>Effects/terrain-default</inherits-from>
|
<inherits-from>Effects/terrain-default</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/forest-relief.png</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<snow-level>
|
|
||||||
<use>/environment/snow-level-m</use>
|
|
||||||
</snow-level>
|
|
||||||
<depth-factor type="float">0.01</depth-factor>
|
|
||||||
<canopy-height type="float">15.0</canopy-height>
|
|
||||||
<quality-level>
|
|
||||||
<use>/sim/rendering/shaders/landmass</use>
|
|
||||||
</quality-level>
|
|
||||||
<!--fog include-->
|
|
||||||
<visibility>
|
|
||||||
<use>/environment/ground-visibility-m</use>
|
|
||||||
</visibility>
|
|
||||||
<avisibility>
|
|
||||||
<use>/environment/visibility-m</use>
|
|
||||||
</avisibility>
|
|
||||||
<lthickness>
|
|
||||||
<use>/environment/ground-haze-thickness-m</use>
|
|
||||||
</lthickness>
|
|
||||||
<scattering>
|
|
||||||
<use>/rendering/scene/scattering</use>
|
|
||||||
</scattering>
|
|
||||||
<terminator>
|
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
|
||||||
</terminator>
|
|
||||||
<fogtype>
|
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
|
||||||
</fogtype>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</parameters>
|
|
||||||
|
|
||||||
<generate>
|
|
||||||
<tangent type="int">6</tangent>
|
|
||||||
<binormal type="int">7</binormal>
|
|
||||||
</generate>
|
|
||||||
<technique n="8">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/landmass</property>
|
|
||||||
<equal>
|
|
||||||
<value type="float">0.0</value>
|
|
||||||
<float-property>/sim/rendering/photoscenery/enabled</float-property>
|
|
||||||
</equal>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">4.0</value>
|
|
||||||
<float-property>/sim/rendering/shaders/landmass</float-property>
|
|
||||||
</less-equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
<extension-supported>GL_EXT_geometry_shader4</extension-supported>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>-1</bin-number>
|
|
||||||
<bin-name>RenderBin</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
|
|
||||||
<vertex-shader n="1">Shaders/landmass-g.vert</vertex-shader>
|
|
||||||
<geometry-shader>Shaders/landmass.geom</geometry-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/terrain-nocolor.frag</fragment-shader>
|
|
||||||
<geometry-vertices-out type="int">18</geometry-vertices-out>
|
|
||||||
<geometry-input-type>triangles</geometry-input-type>
|
|
||||||
<geometry-output-type>triangle-strip</geometry-output-type>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>texture</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>canopy_height</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>canopy-height</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
</pass>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/landmass-g.vert</vertex-shader>
|
|
||||||
<geometry-shader>Shaders/landmass.geom</geometry-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/landmass.frag</fragment-shader>
|
|
||||||
<geometry-vertices-out type="int">18</geometry-vertices-out>
|
|
||||||
<geometry-input-type>triangles</geometry-input-type>
|
|
||||||
<geometry-output-type>triangle-strip</geometry-output-type>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>NoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>BaseTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>depth_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>depth-factor</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>snowlevel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>snow-level</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>canopy_height</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>canopy-height</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>quality_level</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>quality-level</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<depth>
|
|
||||||
<function>lequal</function>
|
|
||||||
<!-- <write-mask type="bool">false</write-mask> -->
|
|
||||||
</depth>
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/landmass</property>
|
|
||||||
<equal>
|
|
||||||
<value type="float">0.0</value>
|
|
||||||
<float-property>/sim/rendering/photoscenery/enabled</float-property>
|
|
||||||
</equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/landmass.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/landmass.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>NoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>BaseTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>depth_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>depth-factor</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>snowlevel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>snow-level</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>quality_level</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>quality-level</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -93,12 +93,4 @@
|
||||||
</polygon-offset>
|
</polygon-offset>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
<technique n="5">
|
|
||||||
<pass n="0">
|
|
||||||
<polygon-offset>
|
|
||||||
<factor>-2.0</factor>
|
|
||||||
<units>-5.0</units>
|
|
||||||
</polygon-offset>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,223 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Legacy Effect.
|
||||||
|
It's kept for backwards compatibility and should not be used on new projects.
|
||||||
|
-->
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/lightmap</name>
|
<name>Effects/lightmap</name>
|
||||||
<parameters>
|
<inherits-from>model-default</inherits-from>
|
||||||
<texture n ="0">
|
|
||||||
<type>white</type>
|
|
||||||
</texture>
|
|
||||||
<vertex-program-two-side type="bool">false</vertex-program-two-side>
|
|
||||||
<material>
|
|
||||||
<color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE -->
|
|
||||||
</material>
|
|
||||||
<condition><use>/sim/rendering/shaders/generic</use></condition>
|
|
||||||
<factor>1</factor>
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<visibility>
|
|
||||||
<use>/environment/ground-visibility-m</use>
|
|
||||||
</visibility>
|
|
||||||
<avisibility>
|
|
||||||
<use>/environment/visibility-m</use>
|
|
||||||
</avisibility>
|
|
||||||
<lthickness>
|
|
||||||
<use>/environment/ground-haze-thickness-m</use>
|
|
||||||
</lthickness>
|
|
||||||
<scattering>
|
|
||||||
<use>/rendering/scene/scattering</use>
|
|
||||||
</scattering>
|
|
||||||
<terminator>
|
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
|
||||||
</terminator>
|
|
||||||
<fogtype>
|
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
|
||||||
</fogtype>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</parameters>
|
|
||||||
<technique n="10">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/generic</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active><use>material/active</use></active>
|
|
||||||
<ambient><use>material/ambient</use></ambient>
|
|
||||||
<diffuse><use>material/diffuse</use></diffuse>
|
|
||||||
<specular><use>material/specular</use></specular>
|
|
||||||
<emissive><use>material/emissive</use></emissive>
|
|
||||||
<shininess><use>material/shininess</use></shininess>
|
|
||||||
<color-mode><use>material/color-mode</use></color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active><use>blend/active</use></active>
|
|
||||||
<source><use>blend/source</use></source>
|
|
||||||
<destination><use>blend/destination</use></destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model><use>shade-model</use></shade-model>
|
|
||||||
<cull-face><use>cull-face</use></cull-face>
|
|
||||||
<rendering-hint><use>rendering-hint</use></rendering-hint>
|
|
||||||
<texture-unit>
|
|
||||||
<!-- The texture unit is always active because the shaders expect
|
|
||||||
that. -->
|
|
||||||
<unit>0</unit>
|
|
||||||
<!-- If there is a texture, the type in the derived effect
|
|
||||||
will be "2d". -->
|
|
||||||
<type><use>texture[0]/type</use></type>
|
|
||||||
<image><use>texture[0]/image</use></image>
|
|
||||||
<filter><use>texture[0]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
||||||
<!--
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
-->
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<!-- The texture unit is always active because the shaders expect
|
|
||||||
that. -->
|
|
||||||
<unit>1</unit>
|
|
||||||
<!-- If there is a texture, the type in the derived effect
|
|
||||||
will be "2d". -->
|
|
||||||
<type><use>texture[1]/type</use></type>
|
|
||||||
<image><use>texture[1]/image</use></image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
<vertex-program-two-side>
|
|
||||||
<use>vertex-program-two-side</use>
|
|
||||||
</vertex-program-two-side>
|
|
||||||
<program>
|
|
||||||
<vertex-shader>Shaders/lightmap.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/lightmap.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>texture</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_texture</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>colorMode</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>material/color-mode-uniform</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>condition</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>condition</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>factor</use></value>
|
|
||||||
</uniform>
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
<technique n="11">
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active><use>material/active</use></active>
|
|
||||||
<ambient><use>material/ambient</use></ambient>
|
|
||||||
<diffuse><use>material/diffuse</use></diffuse>
|
|
||||||
<specular><use>material/specular</use></specular>
|
|
||||||
<emissive><use>material/emissive</use></emissive>
|
|
||||||
<shininess><use>material/shininess</use></shininess>
|
|
||||||
<color-mode><use>material/color-mode</use></color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active><use>blend/active</use></active>
|
|
||||||
<source><use>blend/source</use></source>
|
|
||||||
<destination><use>blend/destination</use></destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model><use>shade-model</use></shade-model>
|
|
||||||
<cull-face><use>cull-face</use></cull-face>
|
|
||||||
<rendering-hint><use>rendering-hint</use></rendering-hint>
|
|
||||||
<texture-unit>
|
|
||||||
<active><use>texture[0]/active</use></active>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image><use>texture[0]/image</use></image>
|
|
||||||
<type><use>texture[0]/type</use></type>
|
|
||||||
<filter><use>texture[0]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
||||||
<!--
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
-->
|
|
||||||
<environment>
|
|
||||||
<mode>modulate</mode>
|
|
||||||
</environment>
|
|
||||||
</texture-unit>
|
|
||||||
<!-- A two-sided lighting model is set by default near the root
|
|
||||||
of the scene graph. Perhaps that ought to be set in this
|
|
||||||
effect?
|
|
||||||
-->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -6,110 +6,4 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/model-combined-transparent</name>
|
<name>Effects/model-combined-transparent</name>
|
||||||
<inherits-from>Effects/model-combined</inherits-from>
|
<inherits-from>Effects/model-combined</inherits-from>
|
||||||
|
|
||||||
<technique n="7">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<equal>
|
|
||||||
<float-property>/sim/rendering/shaders/model</float-property>
|
|
||||||
<value type="float">0.0</value>
|
|
||||||
</equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<depth>
|
|
||||||
<write-mask type="bool">false</write-mask>
|
|
||||||
</depth>
|
|
||||||
<material>
|
|
||||||
<active>
|
|
||||||
<use>material/active</use>
|
|
||||||
</active>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<emissive>
|
|
||||||
<use>material/emissive</use>
|
|
||||||
</emissive>
|
|
||||||
<shininess>
|
|
||||||
<use>material/shininess</use>
|
|
||||||
</shininess>
|
|
||||||
<color-mode>
|
|
||||||
<use>material/color-mode</use>
|
|
||||||
</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active>
|
|
||||||
<use>blend/active</use>
|
|
||||||
</active>
|
|
||||||
<source>
|
|
||||||
<use>blend/source</use>
|
|
||||||
</source>
|
|
||||||
<destination>
|
|
||||||
<use>blend/destination</use>
|
|
||||||
</destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model>
|
|
||||||
<use>shade-model</use>
|
|
||||||
</shade-model>
|
|
||||||
<cull-face>
|
|
||||||
<use>cull-face</use>
|
|
||||||
</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>111</bin-number>
|
|
||||||
<bin-name>DepthSortedBin</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<active>
|
|
||||||
<use>texture[0]/active</use>
|
|
||||||
</active>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<!--
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
-->
|
|
||||||
<environment>
|
|
||||||
<mode>modulate</mode>
|
|
||||||
</environment>
|
|
||||||
</texture-unit>
|
|
||||||
<!-- A two-sided lighting model is set by default near the root
|
|
||||||
of the scene graph. Perhaps that ought to be set in this
|
|
||||||
effect?
|
|
||||||
-->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -391,8 +391,7 @@
|
||||||
<technique n="11">
|
<technique n="11">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
<property>/sim/rendering/shaders/use-shaders</property>
|
||||||
<property>/sim/rendering/shaders/generic</property>
|
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">2.0</value>
|
<value type="float">2.0</value>
|
||||||
|
|
|
@ -472,277 +472,4 @@
|
||||||
</uniform>
|
</uniform>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <technique n="4">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/skydome</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active><use>material/active</use></active>
|
|
||||||
<ambient><use>material/ambient</use></ambient>
|
|
||||||
<diffuse><use>material/diffuse</use></diffuse>
|
|
||||||
<specular><use>material/specular</use></specular>
|
|
||||||
<emissive><use>material/emissive</use></emissive>
|
|
||||||
<shininess><use>material/shininess</use></shininess>
|
|
||||||
<color-mode><use>material/color-mode</use></color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active><use>blend/active</use></active>
|
|
||||||
<source><use>blend/source</use></source>
|
|
||||||
<destination><use>blend/destination</use></destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model><use>shade-model</use></shade-model>
|
|
||||||
<cull-face><use>cull-face</use></cull-face>
|
|
||||||
<rendering-hint><use>rendering-hint</use></rendering-hint>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type><use>texture[0]/type</use></type>
|
|
||||||
<image><use>texture[0]/image</use></image>
|
|
||||||
<filter><use>texture[0]/filter</use></filter>
|
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<type><use>texture[4]/type</use></type>
|
|
||||||
<images><use>texture[4]/images</use></images>
|
|
||||||
</texture-unit>
|
|
||||||
<vertex-program-two-side>
|
|
||||||
<use>vertex-program-two-side</use>
|
|
||||||
</vertex-program-two-side>
|
|
||||||
<program>
|
|
||||||
<vertex-shader>Shaders/generic-ALS-base.vert</vertex-shader>
|
|
||||||
<fragment-shader>Shaders/model-interior-ALS-base.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/hazes.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/noise.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>visibility</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>avisibility</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>lthickness</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>scattering</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>terminator</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>ground_scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>ground_scattering</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>terminator</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terrain_alt</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>terrain_alt</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>overcast</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>overcast</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>eye_alt</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>eye_alt</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>cloud_self_shading</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>cloud_self_shading</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>moonlight</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>moonlight</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>offset_vec</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value><use>opacity-cube-center</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scale_vec</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value><use>opacity-cube-scale</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>angle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>opacity-cube-angle</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>tag_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value><use>implicit-lightmap-tag-color</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>emit_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value><use>implicit-lightmap-emit-color</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>light_filter_one</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value><use>light-filter-one</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>light_filter_two</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value><use>light-filter-two</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>light_radius</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>light-radius</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>threshold_low</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>implicit-lightmap-threshold-low</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>threshold_high</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>implicit-lightmap-threshold-high</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>emit_intensity</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>implicit-lightmap-intensity</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>view_pitch_offset</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>view_pitch_offset</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>view_heading_offset</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>view_heading_offset</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>field_of_view</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>view_fov</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>display_xsize</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>display_xsize</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>display_ysize</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>display_ysize</use></value>
|
|
||||||
</uniform> -->
|
|
||||||
<!-- filtering -->
|
|
||||||
<!--<uniform>
|
|
||||||
<name>gamma</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>gamma</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>brightness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>brightness</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>use_filtering</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value><use>use_filtering</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>use_night_vision</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value><use>use_night_vision</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>use_IR_vision</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value><use>use_IR_vision</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>delta_T</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value><use>delta_T</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>texture</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>cube_texture</name>
|
|
||||||
<type>sampler-cube</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>colorMode</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>material/color-mode-uniform</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>quality_level</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>quality_level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>tquality_level</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>tquality_level</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>implicit_lightmap_enabled</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>implicit-lightmap-enabled</use></value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>use_flashlight</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value><use>use-flashlight</use></value>
|
|
||||||
</uniform>
|
|
||||||
</pass>
|
|
||||||
</technique>-->
|
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -213,7 +213,6 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/skydome</property>
|
<property>/sim/rendering/shaders/skydome</property>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/model</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
@ -1328,600 +1327,4 @@
|
||||||
<!-- END shadows include -->
|
<!-- END shadows include -->
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<!-- Default rendering -->
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/model</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass n="0">
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active>
|
|
||||||
<use>material/active</use>
|
|
||||||
</active>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<emissive>
|
|
||||||
<use>material/emissive</use>
|
|
||||||
</emissive>
|
|
||||||
<shininess>
|
|
||||||
<use>material/shininess</use>
|
|
||||||
</shininess>
|
|
||||||
<color-mode>
|
|
||||||
<use>material/color-mode</use>
|
|
||||||
</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active>
|
|
||||||
<use>blend/active</use>
|
|
||||||
</active>
|
|
||||||
<source>
|
|
||||||
<use>blend/source</use>
|
|
||||||
</source>
|
|
||||||
<destination>
|
|
||||||
<use>blend/destination</use>
|
|
||||||
</destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model>
|
|
||||||
<use>shade-model</use>
|
|
||||||
</shade-model>
|
|
||||||
<cull-face>
|
|
||||||
<use>cull-face</use>
|
|
||||||
</cull-face>
|
|
||||||
<rendering-hint>
|
|
||||||
<use>rendering-hint</use>
|
|
||||||
</rendering-hint>
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<!-- Diffuse texture unit-->
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<!-- Reflection Noise texture unit-->
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<!-- NormalMap texture unit-->
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<!-- LightMap texture unit-->
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<!-- ReflectMap texture unit-->
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<!-- Reflection CubeMap texture unit-->
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
<!-- use this form for a cube cross -->
|
|
||||||
<!--<image>
|
|
||||||
<use>texture[5]/image</use>
|
|
||||||
</image>-->
|
|
||||||
<!-- END CubeCross -->
|
|
||||||
<!-- use this form for a 6 image cube map -->
|
|
||||||
<images>
|
|
||||||
<use>texture[5]/images</use>
|
|
||||||
</images>
|
|
||||||
<!-- END 6 image cube map -->
|
|
||||||
</texture-unit>
|
|
||||||
<!-- Reflection gradients texture unit-->
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[6]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<vertex-program-two-side>
|
|
||||||
<use>vertex-program-two-side</use>
|
|
||||||
</vertex-program-two-side>
|
|
||||||
|
|
||||||
<program n="0">
|
|
||||||
<vertex-shader n="0">Shaders/ubershader.vert</vertex-shader>
|
|
||||||
<vertex-shader n="1">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/ubershader.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>BaseTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>ReflNoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>LightMapTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>ReflMapTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Environment</name>
|
|
||||||
<type>sampler-cube</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>ReflGradientsTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- NORMAL MAP -->
|
|
||||||
<!-- normalmap is used-->
|
|
||||||
<uniform>
|
|
||||||
<name>nmap_enabled</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap-enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- normalmap is .dds-->
|
|
||||||
<uniform>
|
|
||||||
<name>nmap_dds</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap-dds</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>nmap_tile</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap-tiling</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- LIGHTMAP -->
|
|
||||||
<!-- lightmap is used -->
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_enabled</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- lightmap is multichannel -->
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_multi</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-multi</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_r_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-factor[0]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_r_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-color[0]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_g_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-factor[1]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_g_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-color[1]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_b_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-factor[2]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_b_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-color[2]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_a_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-factor[3]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_a_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>lightmap-color[3]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- reflection is used -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_enabled</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>reflection-enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- reflection correction -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_correction</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>reflection-correction</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- use a reflection map-->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_map</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>reflect-map-enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- reflection is dynamic -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_dynamic</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>reflection-dynamic</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of fringing colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_rainbow</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>reflection-rainbow</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of fresnel effect colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_fresnel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>reflection-fresnel</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of noisiness 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_noise</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>reflection-noise</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- dirt -->
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_enabled</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_multi</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-multi</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_r_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-color[0]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_r_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-factor[0]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_g_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-color[1]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_g_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-factor[1]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_b_color</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-color[2]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>dirt_b_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>dirt-factor[2]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>amb_correction</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>ambient-correction</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lonDeg</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>pos-lon</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>latDeg</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>pos-lat</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<!--<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>-->
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,492 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Reflections + Bumpmapping + specular
|
<!--
|
||||||
|
Legacy Effect.
|
||||||
PARAMETERS: There are two forms of cube map texture:- vertical cross and 6 images.
|
It's kept for backwards compatibility and should not be used on new projects.
|
||||||
Either can be used - alternative forms are shown in <parameters> and in <texture-unit>
|
-->
|
||||||
|
<PropertyList>
|
||||||
The reflection is set proportional to the shininess of the material. Thus by
|
<name>Effects/reflect-bump-spec</name>
|
||||||
varying the material shininess value over or between objects the amount of
|
<inherits-from>Effects/model-default</inherits-from>
|
||||||
refection can be controlled. The overall amount of reflection may be
|
</PropertyList>
|
||||||
adjusted by the use of <refl_correction> -1.0 (fully transparent)- 1.0 (fully opaque).
|
|
||||||
|
|
||||||
The overall values of the noisiness, coloured fringing or fresnel effect may be adjusted
|
|
||||||
by the use of <noisiness>, <rainbowiness> and <fresneliness>.
|
|
||||||
|
|
||||||
If your result is too dark/too light the overall ambient light value can be adjusted
|
|
||||||
by the use of <ambient_correction>. This correction also takes out some of the blueness
|
|
||||||
added as default to compensate for the lack of reflection.
|
|
||||||
|
|
||||||
To use a reflection map set <reflect_map> to 1,and the path to the map texture in
|
|
||||||
<texture n="8">
|
|
||||||
|
|
||||||
A default, null, bumpspec is specified as texture unit 4. To provide a custom bumpspec map,
|
|
||||||
define <texture n="4"> in the derived effect file
|
|
||||||
|
|
||||||
If you are using Direct Draw Surface (.dds) files for your bumpmap set <normalmap_dds> to 1.
|
|
||||||
|
|
||||||
USE: To use the default reflection effect (controlled by material shininess values) use
|
|
||||||
|
|
||||||
<effect>
|
|
||||||
<inherits-from>Effects/reflect-bump-spec</inherits-from>
|
|
||||||
<object-name>Fuselage</object-name>
|
|
||||||
</effect>
|
|
||||||
|
|
||||||
To use your own reflection effect, use
|
|
||||||
|
|
||||||
<effect>
|
|
||||||
<inherits-from>Aircraft/Lightning/Models/Effects/lightningreflect</inherits-from>
|
|
||||||
<object-name>Fuselage</object-name>
|
|
||||||
</effect>
|
|
||||||
|
|
||||||
in your model file.
|
|
||||||
|
|
||||||
To use your own effect place your efffect file containing something like this:
|
|
||||||
|
|
||||||
<name>Effects/lightningreflect</name>
|
|
||||||
<inherits-from>Effects/reflect-bump-spec</inherits-from>
|
|
||||||
|
|
||||||
and the the modified tags in the path as above
|
|
||||||
|
|
||||||
EXAMPLES: You can find examples of both usages in the Hunter and Lightning models.
|
|
||||||
-->
|
|
||||||
<PropertyList>
|
|
||||||
<name>Effects/reflect-bump-spec</name>
|
|
||||||
<inherits-from>Effects/model-default</inherits-from>
|
|
||||||
|
|
||||||
<parameters>
|
|
||||||
<texture n="4">
|
|
||||||
<image>Aircraft/Generic/Effects/null_bumpspec.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="5">
|
|
||||||
<type>cubemap</type>
|
|
||||||
<!-- use this form for a cube cross -->
|
|
||||||
<!--<image>Aircraft/Generic/Effects/CubeCrosses/blue_sky_big.jpg</image>-->
|
|
||||||
|
|
||||||
<!-- use this form for a 6 image cube map -->
|
|
||||||
<images>
|
|
||||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
|
|
||||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
|
|
||||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
|
|
||||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
|
|
||||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
|
|
||||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
|
|
||||||
</images>
|
|
||||||
|
|
||||||
</texture>
|
|
||||||
<texture n="6">
|
|
||||||
<image>Aircraft/Generic/Effects/Rainbow.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="7">
|
|
||||||
<image>Aircraft/Generic/Effects/FresnelLookUp.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="8">
|
|
||||||
<image>Aircraft/Generic/Effects/ReflectMaps/reflectmap.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<rendering-hint>transparent</rendering-hint>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<rainbowiness type="float">0.01</rainbowiness>
|
|
||||||
<fresneliness>0.1</fresneliness>
|
|
||||||
<noisiness>0.25</noisiness>
|
|
||||||
<refl_correction>0.0</refl_correction>
|
|
||||||
<ambient_correction>0.05</ambient_correction>
|
|
||||||
<reflect_map>0</reflect_map>
|
|
||||||
<normalmap_dds>0</normalmap_dds>
|
|
||||||
<visibility>
|
|
||||||
<use>/environment/ground-visibility-m</use>
|
|
||||||
</visibility>
|
|
||||||
<avisibility>
|
|
||||||
<use>/environment/visibility-m</use>
|
|
||||||
</avisibility>
|
|
||||||
<lthickness>
|
|
||||||
<use>/environment/ground-haze-thickness-m</use>
|
|
||||||
</lthickness>
|
|
||||||
<scattering>
|
|
||||||
<use>/rendering/scene/scattering</use>
|
|
||||||
</scattering>
|
|
||||||
<terminator>
|
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
|
||||||
</terminator>
|
|
||||||
<fogtype>
|
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
|
||||||
</fogtype>
|
|
||||||
</parameters>
|
|
||||||
|
|
||||||
<generate>
|
|
||||||
<tangent type="int">6</tangent>
|
|
||||||
<binormal type="int">7</binormal>
|
|
||||||
</generate>
|
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/model</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active>
|
|
||||||
<use>material/active</use>
|
|
||||||
</active>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<emissive>
|
|
||||||
<use>material/emissive</use>
|
|
||||||
</emissive>
|
|
||||||
<shininess>
|
|
||||||
<use>material/shininess</use>
|
|
||||||
</shininess>
|
|
||||||
<color-mode>
|
|
||||||
<use>material/color-mode</use>
|
|
||||||
</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active>
|
|
||||||
<use>blend/active</use>
|
|
||||||
</active>
|
|
||||||
<source>
|
|
||||||
<use>blend/source</use>
|
|
||||||
</source>
|
|
||||||
<destination>
|
|
||||||
<use>blend/destination</use>
|
|
||||||
</destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model>
|
|
||||||
<use>shade-model</use>
|
|
||||||
</shade-model>
|
|
||||||
<cull-face>
|
|
||||||
<use>cull-face</use>
|
|
||||||
</cull-face>
|
|
||||||
<rendering-hint>
|
|
||||||
<use>rendering-hint</use>
|
|
||||||
</rendering-hint>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[8]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[8]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[8]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[8]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[8]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[8]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
|
|
||||||
<!-- use this form for a cube cross -->
|
|
||||||
<!--<image><use>texture[5]/image</use></image>-->
|
|
||||||
|
|
||||||
<!-- use this form for a 6 image cube map -->
|
|
||||||
<images>
|
|
||||||
<use>texture[5]/images</use>
|
|
||||||
</images>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>7</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[7]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[7]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[7]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[7]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[7]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader>Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/reflect-bump-spec.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/reflect-bump-spec.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>BaseTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Map</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Noise</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Environment</name>
|
|
||||||
<type>sampler-cube</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Rainbow</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Fresnel</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">7</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of fringing colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>rainbowiness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>rainbowiness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of fresnel effect colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>fresneliness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>fresneliness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of noisiness 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>noisiness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>noisiness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- The reflection is set proportional to the shininess of the material.
|
|
||||||
The amount of reflection may be adjusted by the use of this correction
|
|
||||||
-1.0 (fully transparent)- 1.0 (fully opaque) -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_correction</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>refl_correction</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>ambient_correction</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>ambient_correction</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- use a reflection map-->
|
|
||||||
<uniform>
|
|
||||||
<name>reflect_map</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>reflect_map</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- normalmap is .dds-->
|
|
||||||
<uniform>
|
|
||||||
<name>normalmap_dds</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap_dds</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
|
||||||
|
|
|
@ -1,427 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Reflections
|
<!--
|
||||||
|
Legacy Effect.
|
||||||
PARAMETERS: There are two forms of cube map texture:- vertical cross and 6 images.
|
It's kept for backwards compatibility and should not be used on new projects.
|
||||||
Either can be used - alternative forms are shown in <parameters> and in <texture-unit>
|
|
||||||
The reflection is set proportional to the shininess of the material. Thus by
|
|
||||||
varying the material shininess value over or between objects the amount of
|
|
||||||
refection can be controlled. The overall amount of reflection may be
|
|
||||||
adjusted by the use of <refl_correction> -1.0 (fully transparent)- 1.0 (fully opaque).
|
|
||||||
|
|
||||||
The overall values of the noisiness, coloured fringing or fresnel effect may be adjusted
|
|
||||||
by the use of <noisiness>, <rainbowiness> and <fresneliness>.
|
|
||||||
|
|
||||||
If your result is too dark/too light the overall ambient light value can be adjusted
|
|
||||||
by the use of <ambient_correction>. This correction also takes out some of the blueness
|
|
||||||
added as default to compensate for the lack of reflection.
|
|
||||||
|
|
||||||
To use a reflection map set <reflect_map> to 1,and the path to the map texture in
|
|
||||||
<texture n="8">
|
|
||||||
|
|
||||||
To use a light map set <light_map> to 1,and the path to the map texture in
|
|
||||||
<texture n="2">
|
|
||||||
|
|
||||||
USE: To use the default reflection effect (controlled by material shininess values) use
|
|
||||||
|
|
||||||
<effect>
|
|
||||||
<inherits-from>Effects/reflect</inherits-from>
|
|
||||||
<object-name>Fuselage</object-name>
|
|
||||||
</<effect>
|
|
||||||
|
|
||||||
To use your own reflection effectuse
|
|
||||||
|
|
||||||
<effect>
|
|
||||||
<inherits-from>Aircraft/Lightning/Models/Effects/lightningreflect</inherits-from>
|
|
||||||
<object-name>Fuselage</object-name>
|
|
||||||
</<effect>
|
|
||||||
|
|
||||||
in your model file.
|
|
||||||
|
|
||||||
To use your own effect place your efffect file containing something like this:
|
|
||||||
|
|
||||||
<name>Effects/lightningreflect</name>
|
|
||||||
<inherits-from>Effects/reflect</inherits-from>
|
|
||||||
|
|
||||||
and the the modified tags in the path as above
|
|
||||||
|
|
||||||
EXAMPLES: You can find examples of both usages in the Hunter and Lightning models.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/reflect</name>
|
<name>Effects/reflect</name>
|
||||||
<inherits-from>Effects/model-default</inherits-from>
|
<inherits-from>Effects/model-default</inherits-from>
|
||||||
|
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<!--lightmap image -->
|
|
||||||
<image>Aircraft/Generic/Effects/greymap.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
|
|
||||||
<texture n="5">
|
|
||||||
<type>cubemap</type>
|
|
||||||
<!-- use this form for a cube cross -->
|
|
||||||
<!--<image>Aircraft/Generic/Effects/CubeCrosses/blue_sky_big.jpg</image>-->
|
|
||||||
|
|
||||||
<!-- use this form for a 6 image cube map -->
|
|
||||||
<images>
|
|
||||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
|
|
||||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
|
|
||||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
|
|
||||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
|
|
||||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
|
|
||||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
|
|
||||||
</images>
|
|
||||||
|
|
||||||
</texture>
|
|
||||||
<texture n="6">
|
|
||||||
<image>Aircraft/Generic/Effects/Rainbow.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="7">
|
|
||||||
<image>Aircraft/Generic/Effects/FresnelLookUp.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="8">
|
|
||||||
<image>Aircraft/Generic/Effects/ReflectMaps/reflectmap.png</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<rendering-hint>transparent</rendering-hint>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<rainbowiness type="float">0.01</rainbowiness>
|
|
||||||
<fresneliness>0.1</fresneliness>
|
|
||||||
<noisiness>0.25</noisiness>
|
|
||||||
<refl_correction>0.0</refl_correction>
|
|
||||||
<ambient_correction>0.05</ambient_correction>
|
|
||||||
<reflect_map type="int">0</reflect_map>
|
|
||||||
<light_map type="int">0</light_map>
|
|
||||||
<factor>1</factor>
|
|
||||||
</parameters>
|
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/model</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<active>
|
|
||||||
<use>material/active</use>
|
|
||||||
</active>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<emissive>
|
|
||||||
<use>material/emissive</use>
|
|
||||||
</emissive>
|
|
||||||
<shininess>
|
|
||||||
<use>material/shininess</use>
|
|
||||||
</shininess>
|
|
||||||
<color-mode>
|
|
||||||
<use>material/color-mode</use>
|
|
||||||
</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<active>
|
|
||||||
<use>blend/active</use>
|
|
||||||
</active>
|
|
||||||
<source>
|
|
||||||
<use>blend/source</use>
|
|
||||||
</source>
|
|
||||||
<destination>
|
|
||||||
<use>blend/destination</use>
|
|
||||||
</destination>
|
|
||||||
</blend>
|
|
||||||
<shade-model>
|
|
||||||
<use>shade-model</use>
|
|
||||||
</shade-model>
|
|
||||||
<cull-face>
|
|
||||||
<use>cull-face</use>
|
|
||||||
</cull-face>
|
|
||||||
<rendering-hint>
|
|
||||||
<use>rendering-hint</use>
|
|
||||||
</rendering-hint>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[8]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[8]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[8]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[8]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[8]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
|
|
||||||
<!-- use this form for a cube cross -->
|
|
||||||
<!--<image>
|
|
||||||
<use>texture[5]/image</use>
|
|
||||||
</image>-->
|
|
||||||
|
|
||||||
<!-- use this form for a 6 image cube map -->
|
|
||||||
<images>
|
|
||||||
<use>texture[5]/images</use>
|
|
||||||
</images>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>7</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[7]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[7]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[7]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[7]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[7]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/reflect.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/reflect.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>normal</name>
|
|
||||||
<index>15</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>BaseTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Map</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Lightmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Noise</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Environment</name>
|
|
||||||
<type>sampler-cube</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Rainbow</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Fresnel</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">7</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- set the amount of fringing colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>rainbowiness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>rainbowiness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of fresnel effect colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>fresneliness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>fresneliness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of noisiness 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>noisiness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>noisiness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- The reflection is set proportional to the shininess of the material.
|
|
||||||
The amount of reflection may be adjusted by the use of this correction
|
|
||||||
-1.0 (fully transparent)- 1.0 (fully opaque) -->
|
|
||||||
<uniform>
|
|
||||||
<name>refl_correction</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>refl_correction</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>ambient_correction</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>ambient_correction</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- use a reflection map-->
|
|
||||||
<uniform>
|
|
||||||
<name>reflect_map</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>reflect_map</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- use a light map-->
|
|
||||||
<uniform>
|
|
||||||
<name>light_map</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>light_map</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>lightmap_factor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>factor</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/skydome</property>
|
<property>/sim/rendering/shaders/skydome</property>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/model</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
|
|
@ -886,348 +886,4 @@
|
||||||
</alpha-test>
|
</alpha-test>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/generic</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[8]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[8]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[8]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[8]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[8]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[8]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
|
|
||||||
<!-- use this form for a cube cross -->
|
|
||||||
<!--<image>
|
|
||||||
<use>texture[5]/image</use>
|
|
||||||
</image>-->
|
|
||||||
|
|
||||||
<!-- use this form for a 6 image cube map -->
|
|
||||||
<images>
|
|
||||||
<use>texture[5]/images</use>
|
|
||||||
</images>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>7</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[7]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[7]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[7]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[7]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[7]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<vertex-program-two-side>
|
|
||||||
<use>vertex-program-two-side</use>
|
|
||||||
</vertex-program-two-side>
|
|
||||||
<cull-face>
|
|
||||||
<use>cull-face</use>
|
|
||||||
</cull-face>
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/runway.vert</vertex-shader>
|
|
||||||
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/runway.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
<attribute>
|
|
||||||
<name>tangent</name>
|
|
||||||
<index>6</index>
|
|
||||||
</attribute>
|
|
||||||
<attribute>
|
|
||||||
<name>binormal</name>
|
|
||||||
<index>7</index>
|
|
||||||
</attribute>
|
|
||||||
</program>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>BaseTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Map</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Noise</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>NormalTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Environment</name>
|
|
||||||
<type>sampler-cube</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Rainbow</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Fresnel</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">7</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of fringing colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>rainbowiness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>rainbowiness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of fresnel effect colour 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>fresneliness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>fresneliness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of noisiness 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>noisiness</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>noisiness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- The reflection is set proportional to the shininess of the material.
|
|
||||||
The amount of reflection may be adjusted by the use of this correction
|
|
||||||
-1.0 (fully transparent)- 1.0 (fully opaque) -->
|
|
||||||
<uniform>
|
|
||||||
<name>spec_adjust</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>rnorm</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
|
|
||||||
<uniform>
|
|
||||||
<name>ambient_correction</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>ambient_correction</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- use a reflection map-->
|
|
||||||
<uniform>
|
|
||||||
<name>reflect_map</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>reflect_map</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- normalmap is .dds-->
|
|
||||||
<uniform>
|
|
||||||
<name>normalmap_dds</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap_dds</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1468,10 +1468,7 @@
|
||||||
<and>
|
<and>
|
||||||
<or>
|
<or>
|
||||||
<property>/sim/rendering/photoscenery/enabled</property>
|
<property>/sim/rendering/photoscenery/enabled</property>
|
||||||
<and>
|
<property>/sim/rendering/shaders/use-shaders</property>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/generic</property>
|
|
||||||
</and>
|
|
||||||
</or>
|
</or>
|
||||||
<or>
|
<or>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
|
|
|
@ -71,9 +71,9 @@
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
||||||
<extension-supported>GL_EXT_geometry_shader4</extension-supported>
|
|
||||||
</and>
|
</and>
|
||||||
</or>
|
</or>
|
||||||
|
<extension-supported>GL_EXT_geometry_shader4</extension-supported>
|
||||||
</and>
|
</and>
|
||||||
</predicate>
|
</predicate>
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/transition-base-dirt</name>
|
<name>Effects/transition-base-dirt</name>
|
||||||
<inherits-from>Effects/transition</inherits-from>
|
<inherits-from>Effects/transition</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/dirt3.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<transitions type="float">1.0</transitions>
|
|
||||||
<inverse type="float">0.0</inverse>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,17 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/transition-base-rock</name>
|
<name>Effects/transition-base-rock</name>
|
||||||
<inherits-from>Effects/transition</inherits-from>
|
<inherits-from>Effects/transition</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/herbtundra.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<transitions type="float">1.0</transitions>
|
|
||||||
<inverse type="float">1.0</inverse>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,33 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/transition-base-grass-rock</name>
|
<name>Effects/transition-base-grass-rock</name>
|
||||||
<inherits-from>Effects/transition</inherits-from>
|
<inherits-from>Effects/transition</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/grass10c.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/rock7.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="4">
|
|
||||||
<image>Textures/Terrain.winter/mixedforest1c.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<transitions type="float">2.0</transitions>
|
|
||||||
<inverse type="float">0.0</inverse>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,17 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/transition-base-rock</name>
|
<name>Effects/transition-base-rock</name>
|
||||||
<inherits-from>Effects/transition</inherits-from>
|
<inherits-from>Effects/transition</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/rock7.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<transitions type="float">1.0</transitions>
|
|
||||||
<inverse type="float">0.0</inverse>
|
|
||||||
</parameters>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1,426 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Transition effect starting from the base texture of the scenery, and changing textures according to slope in one or two steps.
|
|
||||||
|
|
||||||
parameters :
|
|
||||||
texture[0] -> base texture from the scenery
|
|
||||||
texture[2] -> intermediate texture if transitions is set to 2
|
|
||||||
texture[3] -> texture you want to transition to
|
|
||||||
texture[4] -> snow texture you want applied above snow-limit (I recommend using the corespondent winter texture for the base texture that you can find in terrain.winter)
|
|
||||||
|
|
||||||
transitions -> transitions number can be set to 1 or 2 (if set to 2 will allow for an intermediate step)
|
|
||||||
inverse -> if this is set to 1 will keep the base texture on steep slopes and transition to the texture you want (useful to add some grass patches in rocky areas)
|
|
||||||
-->
|
|
||||||
|
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/transition</name>
|
<name>Effects/transition</name>
|
||||||
<inherits-from>Effects/terrain-default</inherits-from>
|
<inherits-from>Effects/terrain-default</inherits-from>
|
||||||
<parameters>
|
|
||||||
<texture n="2">
|
|
||||||
<image>Textures/Terrain/transition1.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="3">
|
|
||||||
<image>Textures/Terrain/transition2.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
<texture n="4">
|
|
||||||
<image>Textures/Terrain/snow3.dds</image>
|
|
||||||
<type>2d</type>
|
|
||||||
<filter>linear-mipmap-linear</filter>
|
|
||||||
<wrap-s>repeat</wrap-s>
|
|
||||||
<wrap-t>repeat</wrap-t>
|
|
||||||
<internal-format>normalized</internal-format>
|
|
||||||
</texture>
|
|
||||||
|
|
||||||
<rain-norm>
|
|
||||||
<use>/environment/rain-norm</use>
|
|
||||||
</rain-norm>
|
|
||||||
<snow-level>
|
|
||||||
<use>/environment/snow-level-m</use>
|
|
||||||
</snow-level>
|
|
||||||
|
|
||||||
<cloud-cover0>
|
|
||||||
<use>/environment/clouds/layer[0]/coverage-type</use>
|
|
||||||
</cloud-cover0>
|
|
||||||
<cloud-cover1>
|
|
||||||
<use>/environment/clouds/layer[1]/coverage-type</use>
|
|
||||||
</cloud-cover1>
|
|
||||||
<cloud-cover2>
|
|
||||||
<use>/environment/clouds/layer[2]/coverage-type</use>
|
|
||||||
</cloud-cover2>
|
|
||||||
<cloud-cover3>
|
|
||||||
<use>/environment/clouds/layer[3]/coverage-type</use>
|
|
||||||
</cloud-cover3>
|
|
||||||
<cloud-cover4>
|
|
||||||
<use>/environment/clouds/layer[4]/coverage-type</use>
|
|
||||||
</cloud-cover4>
|
|
||||||
|
|
||||||
<transitions type="float">2.0</transitions>
|
|
||||||
<inverse type="float">0.0</inverse>
|
|
||||||
|
|
||||||
<!-- fog include -->
|
|
||||||
<visibility>
|
|
||||||
<use>/environment/ground-visibility-m</use>
|
|
||||||
</visibility>
|
|
||||||
<avisibility>
|
|
||||||
<use>/environment/visibility-m</use>
|
|
||||||
</avisibility>
|
|
||||||
<lthickness>
|
|
||||||
<use>/environment/ground-haze-thickness-m</use>
|
|
||||||
</lthickness>
|
|
||||||
<scattering>
|
|
||||||
<use>/rendering/scene/scattering</use>
|
|
||||||
</scattering>
|
|
||||||
<terminator>
|
|
||||||
<use>/environment/terminator-relative-position-m</use>
|
|
||||||
</terminator>
|
|
||||||
<fogtype>
|
|
||||||
<use>/sim/rendering/shaders/skydome</use>
|
|
||||||
</fogtype>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</parameters>
|
|
||||||
|
|
||||||
<!--<generate>
|
|
||||||
<tangent type="int">6</tangent>
|
|
||||||
<binormal type="int">7</binormal>
|
|
||||||
</generate>-->
|
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/transition</property>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<!-- Use material values that are either inherited from the
|
|
||||||
terrain-default effect or supplied by an effect derived
|
|
||||||
from this one e.g., one created in the materials library. -->
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<!-- <vertex-shader>Shaders/include_fog.vert</vertex-shader> -->
|
|
||||||
<vertex-shader n="1">Shaders/transition.vert</vertex-shader>
|
|
||||||
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
|
|
||||||
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader n="1">Shaders/transition.frag</fragment-shader>
|
|
||||||
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
|
|
||||||
<fragment-shader n="3">Shaders/clustered-include.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>BaseTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>SecondTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>ThirdTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>SnowTex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>NoiseTex</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>RainNorm</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>rain-norm</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>SnowLevel</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>snow-level</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>Transitions</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>transitions</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>InverseSlope</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>inverse</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover0</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover0</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover1</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover1</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover2</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover2</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover3</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover3</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover4</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover4</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
<!-- BEGIN shadows include -->
|
|
||||||
<uniform>
|
|
||||||
<name>shadow_tex</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">10</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>shadows_enabled</name>
|
|
||||||
<type>bool</type>
|
|
||||||
<value>
|
|
||||||
<use>shadows_enabled</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sun_atlas_size</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>sun_atlas_size</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END shadows include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<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>
|
||||||
<wind_effects><use>/sim/rendering/shaders/wind-effects</use></wind_effects>
|
<wind_effects><use>/sim/rendering/shaders/wind-effects</use></wind_effects>
|
||||||
<forest_effects><use>/sim/rendering/shaders/forest</use></forest_effects>
|
<forest_effects>true</forest_effects>
|
||||||
<windE><use>/environment/sea/surface/wind-from-east-fps</use></windE>
|
<windE><use>/environment/sea/surface/wind-from-east-fps</use></windE>
|
||||||
<windN><use>/environment/sea/surface/wind-from-north-fps</use></windN>
|
<windN><use>/environment/sea/surface/wind-from-north-fps</use></windN>
|
||||||
<display_xsize><use>/sim/startup/xsize</use></display_xsize>
|
<display_xsize><use>/sim/startup/xsize</use></display_xsize>
|
||||||
|
@ -1693,7 +1693,6 @@
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/random-vegetation</property>
|
<property>/sim/rendering/random-vegetation</property>
|
||||||
<less-equal>
|
<less-equal>
|
||||||
<value type="float">1.0</value>
|
<value type="float">1.0</value>
|
||||||
|
|
1994
Effects/urban.eff
|
@ -1414,386 +1414,4 @@
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/water</property>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<float-property>/sim/rendering/shaders/water</float-property>
|
|
||||||
</less-equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[5]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[5]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[5]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[5]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[5]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[6]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<vertex-shader>Shaders/water.vert</vertex-shader>
|
|
||||||
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/water.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_normalmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_dudvmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection_grey</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sea_foam</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>perlin_normalmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- normalmap is .dds-->
|
|
||||||
<uniform>
|
|
||||||
<name>normalmap_dds</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap_dds</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>saturation</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>saturation</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover0</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[0]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover1</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[1]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover2</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[2]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover3</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[3]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover4</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[4]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Status</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>status</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Overcast</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>overcast</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindE</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windE</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindN</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windN</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveFreq</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveFreq</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveAmp</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveAmp</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveSharp</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveSharp</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveAngle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveAngle</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveFactor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveFactor</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveDAngle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveDAngle</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -1390,830 +1390,4 @@
|
||||||
<!-- END fog include -->
|
<!-- END fog include -->
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<technique n="8">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/water</property>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">4.0</value>
|
|
||||||
<float-property>/sim/rendering/shaders/water</float-property>
|
|
||||||
</less-equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>1</unit>
|
|
||||||
<type>noise</type>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[5]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[5]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[5]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[5]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[5]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[6]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>7</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[7]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[7]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[7]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[7]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[7]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[7]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<vertex-shader>Shaders/water.vert</vertex-shader>
|
|
||||||
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/water_sine.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Noise</name>
|
|
||||||
<type>sampler-3d</type>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_normalmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_dudvmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection_grey</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sea_foam</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>perlin_normalmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>topo_map</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">7</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- normalmap is .dds-->
|
|
||||||
<uniform>
|
|
||||||
<name>normalmap_dds</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap_dds</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>saturation</name>
|
|
||||||
<type>float</type>
|
|
||||||
<!--<value>0.4</value>-->
|
|
||||||
<value>
|
|
||||||
<use>saturation</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover0</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[0]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover1</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[1]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover2</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[2]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover3</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[3]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover4</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[4]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- <uniform>
|
|
||||||
<name>CloudCoverLo</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover-lo</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCoverHi</name>
|
|
||||||
<type>float-vec3</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover-hi</use>
|
|
||||||
</value>
|
|
||||||
</uniform>-->
|
|
||||||
<uniform>
|
|
||||||
<name>Status</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>status</use>
|
|
||||||
</value>
|
|
||||||
<!--<value type="int">0</value> -->
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Overcast</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>overcast</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindE</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windE</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindN</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windN</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveFreq</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveFreq</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveAmp</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveAmp</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveSharp</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveSharp</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveAngle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveAngle</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveFactor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveFactor</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveDAngle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveDAngle</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
|
|
||||||
<technique n="9">
|
|
||||||
<predicate>
|
|
||||||
<and>
|
|
||||||
<property>/sim/rendering/shaders/quality-level</property>
|
|
||||||
<property>/sim/rendering/shaders/water</property>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<float-property>/sim/rendering/shaders/water</float-property>
|
|
||||||
</less-equal>
|
|
||||||
<or>
|
|
||||||
<less-equal>
|
|
||||||
<value type="float">2.0</value>
|
|
||||||
<glversion/>
|
|
||||||
</less-equal>
|
|
||||||
<and>
|
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
|
||||||
</and>
|
|
||||||
</or>
|
|
||||||
</and>
|
|
||||||
</predicate>
|
|
||||||
<pass>
|
|
||||||
<lighting>true</lighting>
|
|
||||||
<material>
|
|
||||||
<ambient>
|
|
||||||
<use>material/ambient</use>
|
|
||||||
</ambient>
|
|
||||||
<diffuse>
|
|
||||||
<use>material/diffuse</use>
|
|
||||||
</diffuse>
|
|
||||||
<specular>
|
|
||||||
<use>material/specular</use>
|
|
||||||
</specular>
|
|
||||||
<color-mode>ambient-and-diffuse</color-mode>
|
|
||||||
</material>
|
|
||||||
<blend>
|
|
||||||
<use>transparent</use>
|
|
||||||
</blend>
|
|
||||||
<alpha-test>
|
|
||||||
<use>transparent</use>
|
|
||||||
</alpha-test>
|
|
||||||
<shade-model>smooth</shade-model>
|
|
||||||
<cull-face>back</cull-face>
|
|
||||||
<render-bin>
|
|
||||||
<bin-number>
|
|
||||||
<use>render-bin/bin-number</use>
|
|
||||||
</bin-number>
|
|
||||||
<bin-name>
|
|
||||||
<use>render-bin/bin-name</use>
|
|
||||||
</bin-name>
|
|
||||||
</render-bin>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>0</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[0]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[0]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[0]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[0]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[0]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[0]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>2</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[2]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[2]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[2]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[2]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[2]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[2]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>3</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[3]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[3]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[3]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[3]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[3]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[3]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>4</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[4]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[4]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[4]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[4]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[4]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[4]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>5</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[5]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[5]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[5]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[5]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[5]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[5]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
<texture-unit>
|
|
||||||
<unit>6</unit>
|
|
||||||
<image>
|
|
||||||
<use>texture[6]/image</use>
|
|
||||||
</image>
|
|
||||||
<type>
|
|
||||||
<use>texture[6]/type</use>
|
|
||||||
</type>
|
|
||||||
<filter>
|
|
||||||
<use>texture[6]/filter</use>
|
|
||||||
</filter>
|
|
||||||
<wrap-s>
|
|
||||||
<use>texture[6]/wrap-s</use>
|
|
||||||
</wrap-s>
|
|
||||||
<wrap-t>
|
|
||||||
<use>texture[6]/wrap-t</use>
|
|
||||||
</wrap-t>
|
|
||||||
<internal-format>
|
|
||||||
<use>texture[6]/internal-format</use>
|
|
||||||
</internal-format>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<program>
|
|
||||||
<vertex-shader>Shaders/water.vert</vertex-shader>
|
|
||||||
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
|
|
||||||
<fragment-shader>Shaders/water.frag</fragment-shader>
|
|
||||||
</program>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_normalmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">2</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_dudvmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">3</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>water_reflection_grey</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">4</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>sea_foam</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">5</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>perlin_normalmap</name>
|
|
||||||
<type>sampler-2d</type>
|
|
||||||
<value type="int">6</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- normalmap is .dds-->
|
|
||||||
<uniform>
|
|
||||||
<name>normalmap_dds</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>normalmap_dds</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>saturation</name>
|
|
||||||
<type>float</type>
|
|
||||||
<!--<value>0.4</value>-->
|
|
||||||
<value>
|
|
||||||
<use>saturation</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover0</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[0]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover1</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[1]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover2</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[2]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover3</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[3]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>CloudCover4</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>cloud-cover[4]</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Status</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>status</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>Overcast</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>overcast</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindE</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windE</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WindN</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>windN</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!--uniform> unused?
|
|
||||||
<name>WindFrom</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>wind-from</use>
|
|
||||||
</value>
|
|
||||||
</uniform-->
|
|
||||||
<uniform>
|
|
||||||
<name>WaveFreq</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveFreq</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveAmp</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveAmp</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveSharp</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveSharp</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveAngle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveAngle</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveFactor</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveFactor</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>WaveDAngle</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>WaveDAngle</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<!-- BEGIN fog include -->
|
|
||||||
<uniform>
|
|
||||||
<name>visibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>visibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>avisibility</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>avisibility</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>hazeLayerAltitude</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>lthickness</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>scattering</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>scattering</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>terminator</name>
|
|
||||||
<type>float</type>
|
|
||||||
<value>
|
|
||||||
<use>terminator</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<uniform>
|
|
||||||
<name>fogType</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>fogtype</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
<!-- END fog include -->
|
|
||||||
</pass>
|
|
||||||
</technique>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -226,20 +226,7 @@
|
||||||
<bin-name><use>render-bin/bin-name</use></bin-name>
|
<bin-name><use>render-bin/bin-name</use></bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
|
|
||||||
<texture-unit>
|
<!-- texture unit 0 direct from VPBBuilder.cxx -->
|
||||||
<unit>0</unit>
|
|
||||||
<image><use>texture[0]/image</use></image>
|
|
||||||
<filter>nearest</filter>
|
|
||||||
<mag-filter>nearest</mag-filter>
|
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format><use>texture[0]/internal-format</use></internal-format>
|
|
||||||
<mipmap-control>
|
|
||||||
<r>max</r>
|
|
||||||
<g>max</g>
|
|
||||||
<b>max</b>
|
|
||||||
</mipmap-control>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
<texture-unit>
|
||||||
<unit>1</unit>
|
<unit>1</unit>
|
||||||
|
@ -503,20 +490,7 @@
|
||||||
<bin-name><use>render-bin/bin-name</use></bin-name>
|
<bin-name><use>render-bin/bin-name</use></bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
|
|
||||||
<texture-unit>
|
<!-- texture unit 0 direct from VPBBuilder.cxx -->
|
||||||
<unit>0</unit>
|
|
||||||
<image><use>texture[0]/image</use></image>
|
|
||||||
<filter>nearest</filter>
|
|
||||||
<mag-filter>nearest</mag-filter>
|
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format><use>texture[0]/internal-format</use></internal-format>
|
|
||||||
<mipmap-control>
|
|
||||||
<r>max</r>
|
|
||||||
<g>max</g>
|
|
||||||
<b>max</b>
|
|
||||||
</mipmap-control>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
<texture-unit>
|
||||||
<unit>1</unit>
|
<unit>1</unit>
|
||||||
|
@ -624,20 +598,7 @@
|
||||||
<bin-name><use>render-bin/bin-name</use></bin-name>
|
<bin-name><use>render-bin/bin-name</use></bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
|
|
||||||
<texture-unit>
|
<!-- texture unit 0 direct from VPBBuilder.cxx -->
|
||||||
<unit>0</unit>
|
|
||||||
<image><use>texture[0]/image</use></image>
|
|
||||||
<filter>nearest</filter>
|
|
||||||
<mag-filter>nearest</mag-filter>
|
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
|
||||||
<internal-format><use>texture[0]/internal-format</use></internal-format>
|
|
||||||
<mipmap-control>
|
|
||||||
<r>max</r>
|
|
||||||
<g>max</g>
|
|
||||||
<b>max</b>
|
|
||||||
</mipmap-control>
|
|
||||||
</texture-unit>
|
|
||||||
|
|
||||||
<texture-unit>
|
<texture-unit>
|
||||||
<unit>1</unit>
|
<unit>1</unit>
|
||||||
|
|
1653
Effects/ws30water.eff
Normal file
260
Input/Event/Saitek/SwitchPanel.xml
Normal file
|
@ -0,0 +1,260 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
****************************************************************
|
||||||
|
*Re: Joystick xml codes Library project - open for contributi
|
||||||
|
*Postby FCar » Sun May 29, 2016 6:28 am
|
||||||
|
*
|
||||||
|
*Saitek Switch Panel Event XML file:
|
||||||
|
****************************************************************
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
|
||||||
|
<name>Saitek Pro Flight Switch Panel</name>
|
||||||
|
<name>HOLTEK Saitek Pro Flight Switch Panel</name>
|
||||||
|
<debug-events type="bool">true</debug-events>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-0</name>
|
||||||
|
<desc>Battery master</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/master-bat</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/master-bat</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-1</name>
|
||||||
|
<desc>Alternator master</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/master-alt</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/master-alt</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-2</name>
|
||||||
|
<desc>Avionics master</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/master-avionics</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/master-avionics</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-5</name>
|
||||||
|
<desc>Pitot heat</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/anti-ice/pitot-heat</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/anti-ice/pitot-heat</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-7</name>
|
||||||
|
<desc>Instruments light</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/instruments-norm</property>
|
||||||
|
<value>1.0</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/instruments-norm</property>
|
||||||
|
<value>0.0</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-8</name>
|
||||||
|
<desc>Beacon</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/beacon</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/beacon</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-9</name>
|
||||||
|
<desc>Navigation lights</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/nav-lights</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/nav-lights</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-266</name>
|
||||||
|
<desc>Strobe</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/strobe</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/strobe</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-267</name>
|
||||||
|
<desc>Taxi light</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/taxi-light</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/taxi-light</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-268</name>
|
||||||
|
<desc>Landing lights</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/landing-lights</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/lighting/landing-lights</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-side</name>
|
||||||
|
<desc>Gear</desc>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.gearDown(1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.gearDown(0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-269</name>
|
||||||
|
<desc>Magnetos off</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/magnetos</property>
|
||||||
|
<value>0</value>
|
||||||
|
</binding>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-270</name>
|
||||||
|
<desc>Magnetos right</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/magnetos</property>
|
||||||
|
<value>1</value>
|
||||||
|
</binding>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-271</name>
|
||||||
|
<desc>Magnetos right</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/magnetos</property>
|
||||||
|
<value>2</value>
|
||||||
|
</binding>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-left</name>
|
||||||
|
<desc>Magnetos both</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/magnetos</property>
|
||||||
|
<value>3</value>
|
||||||
|
</binding>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<name>button-right</name>
|
||||||
|
<desc>Starter</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/starter</property>
|
||||||
|
<value>true</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/controls/switches/starter</property>
|
||||||
|
<value>false</value>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</event>
|
||||||
|
|
||||||
|
</PropertyList>
|
160
Input/Joysticks/CH/Combatstick568.xml
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
******************************************************************
|
||||||
|
* Re: Joystick xml codes Library project - open for contributi
|
||||||
|
* Postby N-SCOT » Sun Jan 08, 2017 12:42 pm
|
||||||
|
******************************************************************
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
<name type="string">CH COMBATSTICK USB</name>
|
||||||
|
<axis n="0">
|
||||||
|
<desc>Rudder on ground, aileron in flight</desc>
|
||||||
|
<!-- Implemented on-ground taxi patch by Sebastain Marque -->
|
||||||
|
<binding>
|
||||||
|
<condition>
|
||||||
|
<property>/gear/gear/wow</property>
|
||||||
|
</condition>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<squared type="bool">true</squared>
|
||||||
|
</binding>
|
||||||
|
<desc>Aileron</desc>
|
||||||
|
<dead-band type="double">0.02</dead-band>
|
||||||
|
<binding>
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<property>/gear/gear/wow</property>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/flight/aileron</property>
|
||||||
|
<offset type="double">0.0</offset>
|
||||||
|
<factor type="double">1.0</factor>
|
||||||
|
<tolerance type="double">0.0</tolerance>
|
||||||
|
<squared type="bool">true</squared>
|
||||||
|
<power type="double">2.0</power>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
<axis n="1">
|
||||||
|
<desc type="string">Elevator</desc>
|
||||||
|
<binding>
|
||||||
|
<command type="string">property-scale</command>
|
||||||
|
<property type="string">/controls/flight/elevator</property>
|
||||||
|
<factor type="double">-1</factor>
|
||||||
|
<offset type="double">0</offset>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
<axis n="2">
|
||||||
|
<desc type="string">Throttle</desc>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.throttleAxis();</script>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
<axis n="3">
|
||||||
|
<desc type="string">View (horizontal)</desc>
|
||||||
|
<low>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") + 30);</script>
|
||||||
|
</binding>
|
||||||
|
</low>
|
||||||
|
<high>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") - 30);</script>
|
||||||
|
</binding>
|
||||||
|
</high>
|
||||||
|
</axis>
|
||||||
|
<axis n="4">
|
||||||
|
<desc type="string">View (vertical)</desc>
|
||||||
|
<low>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") - 20);</script>
|
||||||
|
</binding>
|
||||||
|
</low>
|
||||||
|
<high>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") + 20);</script>
|
||||||
|
</binding>
|
||||||
|
</high>
|
||||||
|
</axis>
|
||||||
|
<button>
|
||||||
|
<desc type="string">Trigger</desc>
|
||||||
|
<repeatable type="string">false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.trigger(1);</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.trigger(0);</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
<button n="1">
|
||||||
|
<desc type="string">Brakes</desc>
|
||||||
|
<repeatable type="string">false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.applyBrakes(1);</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.applyBrakes(0);</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
<button n="2">
|
||||||
|
<desc type="string">Gear Up</desc>
|
||||||
|
<repeatable type="string">false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.gearDown(-1);</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.gearDown(0);</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
<button n="4">
|
||||||
|
<desc type="string">Propeller Fine</desc>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.adjPropeller(1);</script>
|
||||||
|
</binding>
|
||||||
|
<repeatable type="double">1</repeatable>
|
||||||
|
</button>
|
||||||
|
<button n="5">
|
||||||
|
<desc type="string">Mixture Rich</desc>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.adjMixture(1);</script>
|
||||||
|
</binding>
|
||||||
|
<repeatable type="double">1</repeatable>
|
||||||
|
</button>
|
||||||
|
<button n="6">
|
||||||
|
<desc type="string">Propeller Coarse</desc>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.adjPropeller(-1);</script>
|
||||||
|
</binding>
|
||||||
|
<repeatable type="double">1</repeatable>
|
||||||
|
</button>
|
||||||
|
<button n="7">
|
||||||
|
<desc type="string">Mixture Lean</desc>
|
||||||
|
<binding>
|
||||||
|
<command type="string">nasal</command>
|
||||||
|
<script type="string">controls.adjMixture(-1);</script>
|
||||||
|
</binding>
|
||||||
|
<repeatable type="double">1</repeatable>
|
||||||
|
</button>
|
||||||
|
</PropertyList>
|
|
@ -0,0 +1,397 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Copyright (c) 2021 FlightGear Flight Simulator
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
Written for the Cessna 172 and only tested on Raspberry Pi OS running
|
||||||
|
FlightGear 2020.3.6
|
||||||
|
|
||||||
|
********************************************************************
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
********************************************************************
|
||||||
|
*
|
||||||
|
* Bindings for Honeycomb Aeronautical Alpha Flight Controls - Yoke
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Axis 0: ailerons
|
||||||
|
* Axis 1: elevator
|
||||||
|
* Axes 2 and 3 (hat): view direction
|
||||||
|
*
|
||||||
|
* Button 0: YOKE white-Trigger left-handle >>>>>>>> View, Cycle Forwards
|
||||||
|
* Button 1: YOKE white-top-Button left-handle >>>>> View, Reset
|
||||||
|
* Button 2: YOKE white-top-Button right-handle
|
||||||
|
* Button 3: YOKE red-top-Button right-handle
|
||||||
|
* Button 4: YOKE outer-Rocker down left-handle >>>> Elevator Trim, Up
|
||||||
|
* Button 5: YOKE outer-Rocker up left-handle >>>>>> Elevator Trim, Down
|
||||||
|
* Button 6: YOKE inner-Rocker down left-handle >>>> Flaps, Down
|
||||||
|
* Button 7: YOKE inner-Rocker up left-handle >>>>>> Flaps, Up
|
||||||
|
* Button 8: YOKE top-Rocker inward right-handle >>> Rudder Trim, Left
|
||||||
|
* Button 9: YOKE top-Rocker outward right-handle >> Rudder Trim, Right
|
||||||
|
* Button 10: YOKE bottom-Rocker inward right-handle
|
||||||
|
* Button 11: YOKE bottom-Rocker outward right-handle
|
||||||
|
* Button 12: BASE Master Alternator up >>>>>>>>>>>>> Master Alternator, ON OFF
|
||||||
|
* Button 13: BASE Master Alternator down
|
||||||
|
* Button 14: BASE Master Battery up >>>>>>>>>>>>>>>> Battery, ON OFF
|
||||||
|
* Button 15: BASE Master Battery down
|
||||||
|
* Button 16: BASE Avionics Bus1 up >>>>>>>>>>>>>>>>> Master Avionics, ON OFF
|
||||||
|
* Button 17: BASE Avionics Bus1 down
|
||||||
|
* Button 18: BASE Avionics Bus2 up
|
||||||
|
* Button 19: BASE Avionics Bus2 down
|
||||||
|
* Button 20: BASE Beacon up >>>>>>>>>>>>>>>>>>>>>>>> Beacon, ON OFF
|
||||||
|
* Button 21: BASE Beacon down
|
||||||
|
* Button 22: BASE Land up >>>>>>>>>>>>>>>>>>>>>>>>>> Landing Lights, ON OFF
|
||||||
|
* Button 23: BASE Land down
|
||||||
|
* Button 24: BASE Taxi up >>>>>>>>>>>>>>>>>>>>>>>>>> Taxi Lights, ON OFF
|
||||||
|
* Button 25: BASE Taxi down
|
||||||
|
* Button 26: BASE Nav up >>>>>>>>>>>>>>>>>>>>>>>>>>> Navigation Lights, ON OFF
|
||||||
|
* Button 27: BASE Nav down
|
||||||
|
* Button 28: BASE Strobe up >>>>>>>>>>>>>>>>>>>>>>>> Strobe Light, ON OFF
|
||||||
|
* Button 29: BASE Strobe down
|
||||||
|
* Button 30: BASE Off >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Magneto, OFF
|
||||||
|
* Button 31: BASE Right Mag >>>>>>>>>>>>>>>>>>>>>>>> Magneto, Right
|
||||||
|
* Button 32: BASE Left Mag >>>>>>>>>>>>>>>>>>>>>>>>> See note below
|
||||||
|
* Button 33: BASE Both Mag >>>>>>>>>>>>>>>>>>>>>>>>> See note below
|
||||||
|
* Button 34: BASE Start >>>>>>>>>>>>>>>>>>>>>>>>>>>> See note below
|
||||||
|
|
||||||
|
********************************************************************
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
<name type="string">Honeycomb Aeronautical Alpha Flight Controls</name>
|
||||||
|
|
||||||
|
<axis>
|
||||||
|
<desc>Aileron</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/flight/aileron</property>
|
||||||
|
<factor type="double">1</factor>
|
||||||
|
<offset type="double">0</offset>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<axis n="1">
|
||||||
|
<desc>Elevator</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/flight/elevator</property>
|
||||||
|
<factor type="double">-1</factor>
|
||||||
|
<offset type="double">0</offset>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<axis n="2">
|
||||||
|
<desc>View, Direction</desc>
|
||||||
|
<direction>left</direction>
|
||||||
|
<low>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>view.panViewDir(1)</script>
|
||||||
|
<module>__js1</module>
|
||||||
|
<offset type="double">1</offset>
|
||||||
|
</binding>
|
||||||
|
</low>
|
||||||
|
<high>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>view.panViewDir(-1)</script>
|
||||||
|
<module>__js1</module>
|
||||||
|
<offset type="double">1</offset>
|
||||||
|
</binding>
|
||||||
|
</high>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<axis n="3">
|
||||||
|
<desc>View, Elevation</desc>
|
||||||
|
<direction>upward</direction>
|
||||||
|
<low>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>view.panViewPitch(1)</script>
|
||||||
|
<module>__js1</module>
|
||||||
|
<offset type="double">1</offset>
|
||||||
|
</binding>
|
||||||
|
</low>
|
||||||
|
<high>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>view.panViewPitch(-1)</script>
|
||||||
|
<module>__js1</module>
|
||||||
|
<offset type="double">1</offset>
|
||||||
|
</binding>
|
||||||
|
</high>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<button n="0">
|
||||||
|
<desc>View, Cycle Forwards</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>view.stepView(1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="1">
|
||||||
|
<desc>View, Reset</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
setprop("/sim/current-view/view-number", 0);
|
||||||
|
view.resetView()
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="4">
|
||||||
|
<desc>Elevator Trim, Up</desc>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.elevatorTrim(-1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="5">
|
||||||
|
<desc>Elevator Trim, Down</desc>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.elevatorTrim(1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="6">
|
||||||
|
<desc>Flaps, Down</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.flapsDown(1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="7">
|
||||||
|
<desc>Flaps, Up</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.flapsDown(-1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="8">
|
||||||
|
<desc>Rudder Trim, Left</desc>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.rudderTrim(-1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="9">
|
||||||
|
<desc>Rudder Trim, Right</desc>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>controls.rudderTrim(1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="12">
|
||||||
|
<desc>Master Alternator, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/master-alt", 1);</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/master-alt", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="14">
|
||||||
|
<desc>Battery, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/master-bat", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/master-bat", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="16">
|
||||||
|
<desc>Master Avionics, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/master-avionics", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/master-avionics", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="20">
|
||||||
|
<desc>Beacon, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/beacon", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/beacon", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="22">
|
||||||
|
<desc>Landing Lights, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/landing-lights", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/landing-lights", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="24">
|
||||||
|
<desc>Taxi Lights, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/taxi-light", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/taxi-light", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="26">
|
||||||
|
<desc>Navigation Lights, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/nav-lights", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/nav-lights", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="28">
|
||||||
|
<desc>Strobe Light, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/strobe", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/strobe", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="30">
|
||||||
|
<desc>Magneto, OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/magnetos", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="31">
|
||||||
|
<desc>Magneto, Right</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/magnetos", 1)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Linux and FlightGear does not handle more than 32 USB buttons.
|
||||||
|
See FlightGear Ticket 2212.
|
||||||
|
|
||||||
|
<button n="32">
|
||||||
|
<desc>Magneto, Left</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/magnetos", 2)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="33">
|
||||||
|
<desc>Magneto, Both</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/switches/magnetos", 3)</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button n="34">
|
||||||
|
<desc>Starter, ON OFF</desc>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/strobe", 1)</script>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/controls/lighting/strobe", 0)</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</button>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</PropertyList>
|
54
Input/Joysticks/Logitech/g25-racing-wheel.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
************************************************************************
|
||||||
|
* Bindings for Logitech G25 Racing Wheel.
|
||||||
|
* Axis 1: rudder
|
||||||
|
* Axis 2: rudder
|
||||||
|
************************************************************************
|
||||||
|
* Postby Ouacaze » Tue Aug 05, 2014 3:55 pm
|
||||||
|
*
|
||||||
|
* Hi,
|
||||||
|
*
|
||||||
|
* I've just copied the "Microsoft SideWinder Precision Racing Wheel" xml file and adapted it * to use with the Logitech G25 Racing Wheel.
|
||||||
|
* It only maps the clutch and throttle pedal as the rudder, but it works well.
|
||||||
|
*
|
||||||
|
* NB: I left the tags for Win and OSX as they were for the microsoft, but I only tested this *on Linux. So if someone could try this under Windows and OSX, and maybe try it with a G27, it *would be great !
|
||||||
|
************************************************************************
|
||||||
|
$Id$
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
<name>G25 Racing Wheel</name>
|
||||||
|
|
||||||
|
<axis n="1">
|
||||||
|
<desc>Rudder Right</desc>
|
||||||
|
<number>
|
||||||
|
<unix>1</unix>
|
||||||
|
<mac>1</mac>
|
||||||
|
<windows>2</windows>
|
||||||
|
</number>
|
||||||
|
<binding>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<factor type="double">-0.5</factor>
|
||||||
|
<offset type="double">-1.0</offset>
|
||||||
|
<squared type="bool">true</squared>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<axis n="2">
|
||||||
|
<desc>Rudder Left</desc>
|
||||||
|
<number>
|
||||||
|
<unix>2</unix>
|
||||||
|
<mac>2</mac>
|
||||||
|
<windows>3</windows>
|
||||||
|
</number>
|
||||||
|
<binding>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<factor type="double">0.5</factor>
|
||||||
|
<offset type="double">-1.0</offset>
|
||||||
|
<squared type="bool">true</squared>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
</PropertyList>
|
60
Input/Joysticks/ThrustMaster/T-Rudder.xml
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
************************************************************************
|
||||||
|
* Setup for Thrustmaster T-Flight rudder pedals.
|
||||||
|
*
|
||||||
|
* These are USB rudder pedals with toe brakes. Bindings are as
|
||||||
|
* follows:
|
||||||
|
*
|
||||||
|
* Axis 0 (toe, right pedal): right differential brake
|
||||||
|
* Axis 1 (toe, left pedal): left differential brake
|
||||||
|
* Axis 2 (combined sliding pedal action): rudder (and nosewheel)
|
||||||
|
*
|
||||||
|
* Settings are similar to the pedals found in the Logitecgh G940 set:
|
||||||
|
* Axes are numbered right-to-left for brakes.
|
||||||
|
* Offset and Factor values are negative.
|
||||||
|
************************************************************************
|
||||||
|
* Re: Joystick xml codes Library project - open for contributi
|
||||||
|
* Postby EFConrad » Fri Nov 25, 2016 10:15 am
|
||||||
|
************************************************************************
|
||||||
|
$Id$
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
|
||||||
|
<name>T-Rudder</name>
|
||||||
|
<name>Thrustmaster T-Rudder</name>
|
||||||
|
|
||||||
|
<axis n="1">
|
||||||
|
<desc>Brake left</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/gear/brake-left</property>
|
||||||
|
<offset>-1.0</offset>
|
||||||
|
<factor>-0.5</factor>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<axis n="0">
|
||||||
|
<desc>Brake right</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/gear/brake-right</property>
|
||||||
|
<offset>-1.0</offset>
|
||||||
|
<factor>-0.5</factor>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
<axis n="2">
|
||||||
|
<desc>Rudder</desc>
|
||||||
|
<binding>
|
||||||
|
<command>property-scale</command>
|
||||||
|
<property>/controls/flight/rudder</property>
|
||||||
|
<factor>1.0</factor>
|
||||||
|
<power>2</power>
|
||||||
|
<offset>0.0</offset>
|
||||||
|
</binding>
|
||||||
|
</axis>
|
||||||
|
|
||||||
|
</PropertyList>
|
|
@ -227,48 +227,56 @@
|
||||||
<description>422 - Salines</description>
|
<description>422 - Salines</description>
|
||||||
<landclass>38</landclass>
|
<landclass>38</landclass>
|
||||||
<material-name>Saline</material-name>
|
<material-name>Saline</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<map>
|
<map>
|
||||||
<description>423 - Intertidal flats</description>
|
<description>423 - Intertidal flats</description>
|
||||||
<landclass>39</landclass>
|
<landclass>39</landclass>
|
||||||
<material-name>Littoral</material-name>
|
<material-name>Littoral</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<map>
|
<map>
|
||||||
<description>511 - Water courses</description>
|
<description>511 - Water courses</description>
|
||||||
<landclass>40</landclass>
|
<landclass>40</landclass>
|
||||||
<material-name>Watercourse</material-name>
|
<material-name>Watercourse</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<map>
|
<map>
|
||||||
<description>512 - Water bodies</description>
|
<description>512 - Water bodies</description>
|
||||||
<landclass>41</landclass>
|
<landclass>41</landclass>
|
||||||
<material-name>Lake</material-name>
|
<material-name>Lake</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<map>
|
<map>
|
||||||
<description>521 - Coastal lagoons</description>
|
<description>521 - Coastal lagoons</description>
|
||||||
<landclass>42</landclass>
|
<landclass>42</landclass>
|
||||||
<material-name>Lagoon</material-name>
|
<material-name>Lagoon</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<map>
|
<map>
|
||||||
<description>522 - Estuaries</description>
|
<description>522 - Estuaries</description>
|
||||||
<landclass>43</landclass>
|
<landclass>43</landclass>
|
||||||
<material-name>Estuary</material-name>
|
<material-name>Estuary</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<map>
|
<map>
|
||||||
<description>523 - Sea and ocean</description>
|
<description>523 - Sea and ocean</description>
|
||||||
<landclass>44</landclass>
|
<landclass>44</landclass>
|
||||||
<material-name>Ocean</material-name>
|
<material-name>Ocean</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<map>
|
<map>
|
||||||
<description>999 - NODATA</description>
|
<description>999 - NODATA</description>
|
||||||
<landclass>48</landclass>
|
<landclass>48</landclass>
|
||||||
<material-name>Ocean</material-name>
|
<material-name>Ocean</material-name>
|
||||||
|
<water>true</water>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
|
|
||||||
<material n="3000">
|
<material n="3000">
|
||||||
<name>ws30</name>
|
<name>ws30land</name>
|
||||||
<effect>Effects/ws30</effect>
|
<effect>Effects/ws30</effect>
|
||||||
<xsize>2000</xsize>
|
<xsize>2000</xsize>
|
||||||
<ysize>2000</ysize>
|
<ysize>2000</ysize>
|
||||||
|
@ -37,6 +37,11 @@
|
||||||
<load-resistance>1e30</load-resistance>
|
<load-resistance>1e30</load-resistance>
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
|
<material n="3001">
|
||||||
|
<name>ws30water</name>
|
||||||
|
<effect>Effects/ws30water</effect>
|
||||||
|
</material>
|
||||||
|
|
||||||
|
|
||||||
<!-- Signage -->
|
<!-- Signage -->
|
||||||
|
|
||||||
|
|
|
@ -2,55 +2,55 @@
|
||||||
<!-- Regional definitions for the Northern Africa -->
|
<!-- Regional definitions for the Northern Africa -->
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>African mediterranean</name>
|
<name>African mediterranean</name>
|
||||||
|
|
||||||
<area>
|
<area>
|
||||||
<lon1>-10.02</lon1>
|
<lon1>-10.02</lon1>
|
||||||
<lon2>-3.69</lon2>
|
<lon2>-3.69</lon2>
|
||||||
<lat1>35.98</lat1>
|
<lat1>35.98</lat1>
|
||||||
<lat2>30.39</lat2>
|
<lat2>30.39</lat2>
|
||||||
</area>
|
</area>
|
||||||
|
|
||||||
<area>
|
<area>
|
||||||
<lon1>-3.69</lon1>
|
<lon1>-3.69</lon1>
|
||||||
<lon2>3.50</lon2>
|
<lon2>3.50</lon2>
|
||||||
<lat1>36.48</lat1>
|
<lat1>36.48</lat1>
|
||||||
<lat2>34.17</lat2>
|
<lat2>34.17</lat2>
|
||||||
</area>
|
</area>
|
||||||
|
|
||||||
<area>
|
<area>
|
||||||
<lon1>3.50</lon1>
|
<lon1>3.50</lon1>
|
||||||
<lon2>11.6</lon2>
|
<lon2>11.6</lon2>
|
||||||
<lat1>34.17</lat1>
|
<lat1>34.17</lat1>
|
||||||
<lat2>37.56</lat2>
|
<lat2>37.56</lat2>
|
||||||
</area>
|
</area>
|
||||||
|
|
||||||
<area>
|
<area>
|
||||||
<lon1>9.75</lon1>
|
<lon1>9.75</lon1>
|
||||||
<lon2>15.38</lon2>
|
<lon2>15.38</lon2>
|
||||||
<lat1>35.02</lat1>
|
<lat1>35.02</lat1>
|
||||||
<lat2>31.85</lat2>
|
<lat2>31.85</lat2>
|
||||||
</area>
|
</area>
|
||||||
|
|
||||||
<area>
|
<area>
|
||||||
<lon1>19.79</lon1>
|
<lon1>19.79</lon1>
|
||||||
<lon2>23.68</lon2>
|
<lon2>23.68</lon2>
|
||||||
<lat1>31.66</lat1>
|
<lat1>31.66</lat1>
|
||||||
<lat2>33.22</lat2>
|
<lat2>33.22</lat2>
|
||||||
</area>
|
</area>
|
||||||
|
|
||||||
<area>
|
<area>
|
||||||
<lon1>-18.43</lon1>
|
<lon1>-18.43</lon1>
|
||||||
<lon2>-13.28</lon2>
|
<lon2>-13.28</lon2>
|
||||||
<lat1>27.47</lat1>
|
<lat1>27.47</lat1>
|
||||||
<lat2>30.50</lat2>
|
<lat2>30.50</lat2>
|
||||||
|
</area>
|
||||||
|
|
||||||
|
<area>
|
||||||
|
<lon1>29.43</lon1>
|
||||||
|
<lon2>33.03</lon2>
|
||||||
|
<lat1>31.75</lat1>
|
||||||
|
<lat2>24.83</lat2>
|
||||||
</area>
|
</area>
|
||||||
|
|
||||||
<area>
|
|
||||||
<lon1>29.43</lon1>
|
|
||||||
<lon2>33.03</lon2>
|
|
||||||
<lat1>31.75</lat1>
|
|
||||||
<lat2>24.83</lat2>
|
|
||||||
</area>
|
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>pa_shoulder</name>
|
<name>pa_shoulder</name>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<uvstretch>8.0</uvstretch>
|
<uvstretch>8.0</uvstretch>
|
||||||
</parameters>
|
</parameters>
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>pc_shoulder</name>
|
<name>pc_shoulder</name>
|
||||||
<texture>Runway/pc_shoulder_mediterranean.png</texture>
|
<texture>Runway/pc_shoulder_mediterranean.png</texture>
|
||||||
|
@ -89,20 +89,30 @@
|
||||||
<name>Airport</name>
|
<name>Airport</name>
|
||||||
<name>AirportKeep</name>
|
<name>AirportKeep</name>
|
||||||
<name>Greenspace</name>
|
<name>Greenspace</name>
|
||||||
<effect>Effects/airfield</effect>
|
<effect>Effects/grass</effect>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/grass_dry3.png</texture>
|
<texture>Terrain/grass_dry3a.png</texture>
|
||||||
<texture n="13">Terrain/grass_dry3.png</texture>
|
<texture n="13">Terrain/grass_dry2.png</texture>
|
||||||
<texture n="14">Terrain/gravel_overlay.png</texture>
|
<texture n="14">Terrain/gravel_brown.png</texture>
|
||||||
|
<texture n="15">Terrain/airport_grass_structure_overlay2.png</texture>
|
||||||
|
<texture n="20">Terrain/savanna-grass2.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
<parameters>
|
<parameters>
|
||||||
<grit_alpha>0.4</grit_alpha>
|
<hires_overlay_bias>2.5</hires_overlay_bias>
|
||||||
|
<grit_alpha>0.8</grit_alpha>
|
||||||
|
<base_layer_magnification>0.4</base_layer_magnification>
|
||||||
<use_overlay>1</use_overlay>
|
<use_overlay>1</use_overlay>
|
||||||
<overlay_bias>0.5</overlay_bias>
|
<overlay_layer_magnification>6.0</overlay_layer_magnification>
|
||||||
|
<overlay_bias>0.125</overlay_bias>
|
||||||
|
<overlay_alpha>1.21</overlay_alpha>
|
||||||
<use_color_overlay>0</use_color_overlay>
|
<use_color_overlay>0</use_color_overlay>
|
||||||
<base_layer_magnification>1.0</base_layer_magnification>
|
<use_grain>1</use_grain>
|
||||||
<overlay_layer_magnification>16.0</overlay_layer_magnification>
|
<grain_layer_magnification>10.0</grain_layer_magnification>
|
||||||
<overlay_alpha>1.0</overlay_alpha>
|
<max_grass_height>0.3</max_grass_height>
|
||||||
|
<grass_density>1.0</grass_density>
|
||||||
|
<grass_groups>2</grass_groups>
|
||||||
|
<grass_modulate_by_overlay>1</grass_modulate_by_overlay>
|
||||||
|
<grass_modulate_height_min>0.0</grass_modulate_height_min>
|
||||||
</parameters>
|
</parameters>
|
||||||
<xsize>256</xsize>
|
<xsize>256</xsize>
|
||||||
<ysize>256</ysize>
|
<ysize>256</ysize>
|
||||||
|
@ -128,29 +138,27 @@
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>EvergreenBroadCover</name>
|
|
||||||
<name>EvergreenForest</name>
|
|
||||||
<name>RainForest</name>
|
<name>RainForest</name>
|
||||||
<name>MixedForestCover</name>
|
<name>MixedForestCover</name>
|
||||||
<name>MixedForest</name>
|
<name>MixedForest</name>
|
||||||
<name>DeciduousBroadCover</name>
|
<name>DeciduousBroadCover</name>
|
||||||
<name>DeciduousForest</name>
|
<name>DeciduousForest</name>
|
||||||
<name>DeciduousNeedleCover</name>
|
<name>DeciduousNeedleCover</name>
|
||||||
<effect>Effects/forest</effect>
|
<effect>Effects/forest</effect>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/grass-caribbean.png</texture>
|
<texture>Terrain/airport_grass2.png</texture>
|
||||||
<texture n="11">Terrain/gravel_gray.png</texture>
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
<texture n="15">Terrain/airport_grass2.png</texture>
|
<texture n="12">Terrain/gravel_gray.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
<parameters>
|
<parameters>
|
||||||
<grain_strength>0.5</grain_strength>
|
<grain_strength>0.5</grain_strength>
|
||||||
<hires_overlay_bias>0.1</hires_overlay_bias>
|
<hires_overlay_bias><use>/sim/rendering/desert</use></hires_overlay_bias>
|
||||||
</parameters>
|
</parameters>
|
||||||
<xsize>2000</xsize>
|
<xsize>10000</xsize>
|
||||||
<ysize>2000</ysize>
|
<ysize>10000</ysize>
|
||||||
<light-coverage>4000000.0</light-coverage>
|
<light-coverage>4000000.0</light-coverage>
|
||||||
<wood-coverage>14000.0</wood-coverage>
|
<wood-coverage>14000.0</wood-coverage>
|
||||||
<tree-texture>Trees/tropical-alt.png</tree-texture>
|
<tree-texture>Trees/tropical-alt.png</tree-texture>
|
||||||
<tree-varieties>4</tree-varieties>
|
<tree-varieties>4</tree-varieties>
|
||||||
<tree-height-m>20.0</tree-height-m>
|
<tree-height-m>20.0</tree-height-m>
|
||||||
<tree-width-m>25.0</tree-width-m>
|
<tree-width-m>25.0</tree-width-m>
|
||||||
|
@ -158,40 +166,124 @@
|
||||||
<bumpiness>0.85</bumpiness>
|
<bumpiness>0.85</bumpiness>
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>Grassland</name>
|
<name>EvergreenBroadCover</name>
|
||||||
|
<name>EvergreenForest</name>
|
||||||
|
<effect>Effects/forest</effect>
|
||||||
|
<texture-set>
|
||||||
|
<texture>Terrain/california-forest.png</texture>
|
||||||
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
|
<texture n="12">Terrain/gravel_gray.png</texture>
|
||||||
|
<texture n="13">Terrain/grass_dry2a_darker.png</texture>
|
||||||
|
<texture n="14">Terrain/gravel_gray.png</texture>
|
||||||
|
<texture n="15">Terrain/gravel_brown.png</texture>
|
||||||
|
</texture-set>
|
||||||
|
<object-mask>Terrain/pantanal-mask.png</object-mask>
|
||||||
|
<parameters>
|
||||||
|
<grit_alpha>0.4</grit_alpha>
|
||||||
|
<base_layer_magnification>1.0</base_layer_magnification>
|
||||||
|
<use_overlay>1</use_overlay>
|
||||||
|
<overlay_bias>0.5</overlay_bias>
|
||||||
|
<use_color_overlay>0</use_color_overlay>
|
||||||
|
<overlay_layer_magnification>60.0</overlay_layer_magnification>
|
||||||
|
<use_grain>0</use_grain>
|
||||||
|
<grain_strength>0.5</grain_strength>
|
||||||
|
<hires_overlay_bias><use>/sim/rendering/desert</use></hires_overlay_bias>
|
||||||
|
<grain_layer_magnification>4.0</grain_layer_magnification>
|
||||||
|
</parameters>
|
||||||
|
<xsize>10000</xsize>
|
||||||
|
<ysize>10000</ysize>
|
||||||
|
<light-coverage>4000000.0</light-coverage>
|
||||||
|
<wood-coverage>8000.0</wood-coverage>
|
||||||
|
<tree-texture>Trees/savanna-trees.png</tree-texture>
|
||||||
|
<tree-varieties>4</tree-varieties>
|
||||||
|
<tree-height-m>12.0</tree-height-m>
|
||||||
|
<tree-width-m>8.0</tree-width-m>
|
||||||
|
<rolling-friction>0.8</rolling-friction>
|
||||||
|
<bumpiness>0.85</bumpiness>
|
||||||
|
</material>
|
||||||
|
|
||||||
|
<material>
|
||||||
|
<name>Grassland</name>
|
||||||
<name>GrassCover</name>
|
<name>GrassCover</name>
|
||||||
<effect>Effects/forest</effect>
|
<effect>Effects/forest</effect>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/grass-caribbean.png</texture>
|
<texture>Terrain/pampas-grass.png</texture>
|
||||||
<texture n="11">Terrain/grass_dry3a.png</texture>
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
<texture n="12">Terrain/grass_dry3.png</texture>
|
<texture n="12">Terrain/gravel_gray.png</texture>
|
||||||
<texture n="15">Terrain/airport_grass2.png</texture>
|
<texture n="13">Terrain/grass_dry2a_darker.png</texture>
|
||||||
|
<texture n="14">Terrain/gravel_gray.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
<parameters>
|
<parameters>
|
||||||
<grain_strength>0.5</grain_strength>
|
<transition_model>0.5</transition_model>
|
||||||
<hires_overlay_bias>-0.1</hires_overlay_bias>
|
<grain_strength>0.5</grain_strength>
|
||||||
</parameters>
|
<hires_overlay_bias><use>/sim/rendering/desert</use></hires_overlay_bias>
|
||||||
<xsize>2000</xsize>
|
<transition_model>0.5</transition_model>
|
||||||
<ysize>2000</ysize>
|
<use_grain>1</use_grain>
|
||||||
|
<grain_layer_magnification>0.2</grain_layer_magnification>
|
||||||
|
<grit_alpha>0.8</grit_alpha>
|
||||||
|
</parameters>
|
||||||
|
<xsize>10000</xsize>
|
||||||
|
<ysize>10000</ysize>
|
||||||
<light-coverage>4000000.0</light-coverage>
|
<light-coverage>4000000.0</light-coverage>
|
||||||
<wood-coverage>40000.0</wood-coverage>
|
<wood-coverage>65000.0</wood-coverage>
|
||||||
<tree-texture>Trees/tropical-alt.png</tree-texture>
|
<tree-texture>Trees/mojave-shrub.png</tree-texture>
|
||||||
<tree-varieties>4</tree-varieties>
|
<tree-varieties>8</tree-varieties>
|
||||||
<tree-height-m>20.0</tree-height-m>
|
<tree-height-m>4.0</tree-height-m>
|
||||||
<tree-width-m>25.0</tree-width-m>
|
<tree-width-m>2.0</tree-width-m>
|
||||||
<rolling-friction>0.4</rolling-friction>
|
<rolling-friction>0.4</rolling-friction>
|
||||||
<bumpiness>0.65</bumpiness>
|
<bumpiness>0.65</bumpiness>
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>Shrub</name>
|
<name>Shrub</name>
|
||||||
<name>ShrubCover</name>
|
<name>ShrubCover</name>
|
||||||
<name>ShrubGrassCover</name>
|
<name>ShrubGrassCover</name>
|
||||||
<name>ScrubCover</name>
|
<name>ScrubCover</name>
|
||||||
<name>Scrub</name>
|
<name>Scrub</name>
|
||||||
<name>Sclerophyllous</name>
|
|
||||||
<name>Marsh</name>
|
<name>Marsh</name>
|
||||||
|
<effect>Effects/forest</effect>
|
||||||
|
<texture-set>
|
||||||
|
<texture>Terrain/pampas-shrub.png</texture>
|
||||||
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
|
<texture n="12">Terrain/gravel_gray.png</texture>
|
||||||
|
<texture n="13">Terrain/grass_dry2a_darker.png</texture>
|
||||||
|
<texture n="14">Terrain/gravel_gray.png</texture>
|
||||||
|
</texture-set>
|
||||||
|
<object-mask>Terrain/pantanal-mask.png</object-mask>
|
||||||
|
<parameters>
|
||||||
|
<hires_overlay_bias><use>/sim/rendering/desert</use></hires_overlay_bias>
|
||||||
|
<rotation_flag>random</rotation_flag>
|
||||||
|
<rotation_scale>1000.0</rotation_scale>
|
||||||
|
<rock_strata>1</rock_strata>
|
||||||
|
<use_grain>1</use_grain>
|
||||||
|
<grain_strength>0.8</grain_strength>
|
||||||
|
<grain_layer_magnification>8.0</grain_layer_magnification>
|
||||||
|
<transition_model>0.5</transition_model>
|
||||||
|
<use_overlay>1</use_overlay>
|
||||||
|
<overlay_scale>10.0</overlay_scale>
|
||||||
|
<overlay_bias>-0.05</overlay_bias>
|
||||||
|
<overlay_alpha>0.75</overlay_alpha>
|
||||||
|
<overlay_hardness>0.2</overlay_hardness>
|
||||||
|
<overlay_density>2.2</overlay_density>
|
||||||
|
<use_color_overlay>0</use_color_overlay>
|
||||||
|
<overlay_layer_magnification>8.0</overlay_layer_magnification>
|
||||||
|
</parameters>
|
||||||
|
<xsize>10000</xsize>
|
||||||
|
<ysize>10000</ysize>
|
||||||
|
<light-coverage>4000000.0</light-coverage>
|
||||||
|
<wood-coverage>12000.0</wood-coverage>
|
||||||
|
<tree-texture>Trees/mediterranean-shrub.png</tree-texture>
|
||||||
|
<tree-texture>Trees/savanna-trees.png</tree-texture>
|
||||||
|
<tree-varieties>4</tree-varieties>
|
||||||
|
<tree-height-m>4.0</tree-height-m>
|
||||||
|
<tree-width-m>4.0</tree-width-m>
|
||||||
|
<rolling-friction>0.4</rolling-friction>
|
||||||
|
<bumpiness>0.65</bumpiness>
|
||||||
|
</material>
|
||||||
|
|
||||||
|
<material>
|
||||||
|
<name>Sclerophyllous</name>
|
||||||
<name>FloodLand</name>
|
<name>FloodLand</name>
|
||||||
<name>SaltMarsh</name>
|
<name>SaltMarsh</name>
|
||||||
<name>HerbWetlandCover</name>
|
<name>HerbWetlandCover</name>
|
||||||
|
@ -203,18 +295,18 @@
|
||||||
<texture n="12">Terrain/gravel_gray.png</texture>
|
<texture n="12">Terrain/gravel_gray.png</texture>
|
||||||
<texture n="15">Terrain/airport_grass2.png</texture>
|
<texture n="15">Terrain/airport_grass2.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
<parameters>
|
<parameters>
|
||||||
<grain_strength>0.5</grain_strength>
|
<grain_strength>0.5</grain_strength>
|
||||||
<hires_overlay_bias>-0.08</hires_overlay_bias>
|
<hires_overlay_bias>-0.08</hires_overlay_bias>
|
||||||
</parameters>
|
</parameters>
|
||||||
<xsize>4000</xsize>
|
<xsize>4000</xsize>
|
||||||
<ysize>4000</ysize>
|
<ysize>4000</ysize>
|
||||||
<light-coverage>4000000.0</light-coverage>
|
<light-coverage>4000000.0</light-coverage>
|
||||||
<wood-coverage>30000.0</wood-coverage>
|
<wood-coverage>30000.0</wood-coverage>
|
||||||
<tree-texture>Trees/mixed-shrub.png</tree-texture>
|
<tree-texture>Trees/mixed-shrub.png</tree-texture>
|
||||||
<tree-varieties>4</tree-varieties>
|
<tree-varieties>4</tree-varieties>
|
||||||
<tree-height-m>10.0</tree-height-m>
|
<tree-height-m>6.0</tree-height-m>
|
||||||
<tree-width-m>15.0</tree-width-m>
|
<tree-width-m>8.0</tree-width-m>
|
||||||
<rolling-friction>0.4</rolling-friction>
|
<rolling-friction>0.4</rolling-friction>
|
||||||
<bumpiness>0.65</bumpiness>
|
<bumpiness>0.65</bumpiness>
|
||||||
</material>
|
</material>
|
||||||
|
@ -224,12 +316,17 @@
|
||||||
<name>DryCrop</name>
|
<name>DryCrop</name>
|
||||||
<name>NaturalCrop</name>
|
<name>NaturalCrop</name>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/dry_pasture4.png</texture>
|
<texture>Terrain/california-drycrop.png</texture>
|
||||||
<texture n="11">Terrain/sand_hires_ochre.png</texture>
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
<texture n="12">Terrain/dry_pasture4.png</texture>
|
<texture n="12">Terrain/gravel_gray.png</texture>
|
||||||
|
<texture n="13">Terrain/desert-airport2.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
<parameters>
|
<parameters>
|
||||||
<hires_overlay_bias>-0.1</hires_overlay_bias>
|
<rotation_flag>random</rotation_flag>
|
||||||
|
<hires_overlay_bias>-0.2</hires_overlay_bias>
|
||||||
|
<grain_strength>0.5</grain_strength>
|
||||||
|
<grit_alpha>0.8</grit_alpha>
|
||||||
|
<use_grain>1</use_grain>
|
||||||
</parameters>
|
</parameters>
|
||||||
<xsize>2000</xsize>
|
<xsize>2000</xsize>
|
||||||
<ysize>2000</ysize>
|
<ysize>2000</ysize>
|
||||||
|
@ -242,21 +339,24 @@
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>IrrCropPastureCover</name>
|
|
||||||
<name>IrrCrop</name>
|
|
||||||
<name>Orchard</name>
|
<name>Orchard</name>
|
||||||
<name>Olives</name>
|
<name>Olives</name>
|
||||||
<name>Vineyard</name>
|
<name>Vineyard</name>
|
||||||
<name>Rice</name>
|
<name>Rice</name>
|
||||||
<name>MixedCropPastureCover</name>
|
|
||||||
<name>MixedCrop</name>
|
|
||||||
<name>Crop</name>
|
|
||||||
<name>ComplexCrop</name>
|
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/mixedcrop2.png</texture>
|
<texture>Terrain/cerrado-crop.png</texture>
|
||||||
<texture n="11">Terrain/grass_dry3a.png</texture>
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
<texture n="15">Terrain/sand_hires_ochre.png</texture>
|
<texture n="15">Terrain/sand_hires_ochre.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
|
<parameters>
|
||||||
|
<rock_strata>1</rock_strata>
|
||||||
|
<use_overlay>1</use_overlay>
|
||||||
|
<hires_overlay_bias>-0.1</hires_overlay_bias>
|
||||||
|
<use_color_overlay>1</use_color_overlay>
|
||||||
|
<grain_strength>0.1</grain_strength>
|
||||||
|
<grit_alpha>0.8</grit_alpha>
|
||||||
|
<use_grain>1</use_grain>
|
||||||
|
</parameters>
|
||||||
<object-mask>Terrain/mixedcrop2-mask.png</object-mask>
|
<object-mask>Terrain/mixedcrop2-mask.png</object-mask>
|
||||||
<xsize>2000</xsize>
|
<xsize>2000</xsize>
|
||||||
<ysize>2000</ysize>
|
<ysize>2000</ysize>
|
||||||
|
@ -267,22 +367,73 @@
|
||||||
<bumpiness>0.7</bumpiness>
|
<bumpiness>0.7</bumpiness>
|
||||||
<load-resistance>1e30</load-resistance>
|
<load-resistance>1e30</load-resistance>
|
||||||
<object-group include="Materials/base/sa-farm-buildings.xml"/>
|
<object-group include="Materials/base/sa-farm-buildings.xml"/>
|
||||||
<wood-coverage>3500.0</wood-coverage>
|
<wood-coverage>13500.0</wood-coverage>
|
||||||
<tree-texture>Trees/mixed-shrub.png</tree-texture>
|
<tree-texture>Trees/savanna-trees.png</tree-texture>
|
||||||
<tree-varieties>8</tree-varieties>
|
<tree-varieties>4</tree-varieties>
|
||||||
<tree-height-m>20.0</tree-height-m>
|
<tree-height-m>8.0</tree-height-m>
|
||||||
<tree-width-m>12.0</tree-width-m>
|
<tree-width-m>6.0</tree-width-m>
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
|
<material>
|
||||||
|
<name>IrrCropPastureCover</name>
|
||||||
|
<name>IrrCrop</name>
|
||||||
|
<name>MixedCropPastureCover</name>
|
||||||
|
<name>MixedCrop</name>
|
||||||
|
<name>Crop</name>
|
||||||
|
<name>ComplexCrop</name>
|
||||||
|
<texture-set>
|
||||||
|
<texture>Terrain/cerrado-crop.png</texture>
|
||||||
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
|
<texture n="15">Terrain/sand_hires_ochre.png</texture>
|
||||||
|
</texture-set>
|
||||||
|
<parameters>
|
||||||
|
<rock_strata>1</rock_strata>
|
||||||
|
<use_overlay>1</use_overlay>
|
||||||
|
<hires_overlay_bias>-0.15</hires_overlay_bias>
|
||||||
|
<use_color_overlay>1</use_color_overlay>
|
||||||
|
<grain_strength>0.1</grain_strength>
|
||||||
|
<grit_alpha>0.8</grit_alpha>
|
||||||
|
<use_grain>1</use_grain>
|
||||||
|
</parameters>
|
||||||
|
<object-mask>Terrain/mixedcrop2-mask.png</object-mask>
|
||||||
|
<xsize>2000</xsize>
|
||||||
|
<ysize>2000</ysize>
|
||||||
|
<light-coverage>2000000.0</light-coverage>
|
||||||
|
<solid>1</solid>
|
||||||
|
<friction-factor>0.9</friction-factor>
|
||||||
|
<rolling-friction>0.1</rolling-friction>
|
||||||
|
<bumpiness>0.7</bumpiness>
|
||||||
|
<load-resistance>1e30</load-resistance>
|
||||||
|
<object-group include="Materials/base/sa-farm-buildings.xml"/>
|
||||||
|
<wood-coverage>13500.0</wood-coverage>
|
||||||
|
<tree-texture>Trees/savanna-trees.png</tree-texture>
|
||||||
|
<tree-varieties>4</tree-varieties>
|
||||||
|
<tree-height-m>8.0</tree-height-m>
|
||||||
|
<tree-width-m>6.0</tree-width-m>
|
||||||
|
<diffuse>
|
||||||
|
<r>0.83</r>
|
||||||
|
<g>0.85</g>
|
||||||
|
<b>0.83</b>
|
||||||
|
<a>1.0</a>
|
||||||
|
</diffuse>
|
||||||
|
<specular>
|
||||||
|
<r>0.1</r>
|
||||||
|
<g>0.12</g>
|
||||||
|
<b>0.1</b>
|
||||||
|
<a>1.0</a>
|
||||||
|
</specular>
|
||||||
|
<shininess>1.2</shininess>
|
||||||
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>DryLake</name>
|
<name>DryLake</name>
|
||||||
<name>IntermittentReservoir</name>
|
<name>IntermittentReservoir</name>
|
||||||
<name>IntermittentLake</name>
|
<name>IntermittentLake</name>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/sand1.png</texture>
|
<texture>Terrain/sand1.png</texture>
|
||||||
<texture n="12">Terrain/grass_dry3.png</texture>
|
<texture n="12">Terrain/gravel_gray.png</texture>
|
||||||
<texture n="15">Terrain/sand_hires_ochre.png</texture>
|
<texture n="15">Terrain/sand_hires_ochre.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
<parameters>
|
<parameters>
|
||||||
<dot_density>0.2</dot_density>
|
<dot_density>0.2</dot_density>
|
||||||
</parameters>
|
</parameters>
|
||||||
|
@ -294,7 +445,7 @@
|
||||||
<friction-factor>0.7</friction-factor>
|
<friction-factor>0.7</friction-factor>
|
||||||
<bumpiness>0.1</bumpiness>
|
<bumpiness>0.1</bumpiness>
|
||||||
</material>
|
</material>
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>BarrenCover</name>
|
<name>BarrenCover</name>
|
||||||
<name>Dirt</name>
|
<name>Dirt</name>
|
||||||
|
@ -303,11 +454,11 @@
|
||||||
<name>Dump</name>
|
<name>Dump</name>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/california-rock.png</texture>
|
<texture>Terrain/california-rock.png</texture>
|
||||||
<texture n="11">Terrain/gravel_gray.png</texture>
|
<texture n="11">Terrain/desert-airport2.png</texture>
|
||||||
<texture n="14">Terrain/grain_texture.png</texture>
|
<texture n="14">Terrain/grain_texture.png</texture>
|
||||||
</texture-set>
|
</texture-set>
|
||||||
<parameters>
|
<parameters>
|
||||||
<hires_overlay_bias>-0.1</hires_overlay_bias>
|
<hires_overlay_bias>-0.1</hires_overlay_bias>
|
||||||
<grain_strength>0.7</grain_strength>
|
<grain_strength>0.7</grain_strength>
|
||||||
</parameters>
|
</parameters>
|
||||||
<xsize>3000</xsize>
|
<xsize>3000</xsize>
|
||||||
|
|
|
@ -81,8 +81,10 @@
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<name>Greenspace</name>
|
<name>Greenspace</name>
|
||||||
|
<effect>Effects/agriculture</effect>
|
||||||
<texture>Terrain/golfcourse1-autumn.png</texture>
|
<texture>Terrain/golfcourse1-autumn.png</texture>
|
||||||
<object-mask>Terrain/golfcourse1.mask.png</object-mask>
|
<object-mask>Terrain/golfcourse1.mask.png</object-mask>
|
||||||
|
<tree-effect>Effects/tree-european-mixed</tree-effect>
|
||||||
<xsize>800</xsize>
|
<xsize>800</xsize>
|
||||||
<ysize>800</ysize>
|
<ysize>800</ysize>
|
||||||
<light-coverage>2000000.0</light-coverage>
|
<light-coverage>2000000.0</light-coverage>
|
||||||
|
@ -150,7 +152,8 @@
|
||||||
<material>
|
<material>
|
||||||
<name>CropGrassCover</name>
|
<name>CropGrassCover</name>
|
||||||
<name>CropGrass</name>
|
<name>CropGrass</name>
|
||||||
<effect>Effects/agriculture</effect>
|
<effect>Effects/cropgrass</effect>
|
||||||
|
<tree-effect>Effects/tree-european-deciduous</tree-effect>
|
||||||
<texture>Terrain/irrcrop.png</texture>
|
<texture>Terrain/irrcrop.png</texture>
|
||||||
<object-mask>Terrain/irrcrop.mask.png</object-mask>
|
<object-mask>Terrain/irrcrop.mask.png</object-mask>
|
||||||
<parameters>
|
<parameters>
|
||||||
|
@ -253,6 +256,7 @@
|
||||||
<name>Construction</name>
|
<name>Construction</name>
|
||||||
<name>Industrial</name>
|
<name>Industrial</name>
|
||||||
<effect>Effects/urban</effect>
|
<effect>Effects/urban</effect>
|
||||||
|
<tree-effect>Effects/tree-european-deciduous</tree-effect>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/industrial-alt.png</texture>
|
<texture>Terrain/industrial-alt.png</texture>
|
||||||
<texture n="2">Terrain/industrial-alt-relief-light.png</texture>
|
<texture n="2">Terrain/industrial-alt-relief-light.png</texture>
|
||||||
|
@ -277,7 +281,17 @@
|
||||||
<b>0.02</b>
|
<b>0.02</b>
|
||||||
<a>1.0</a>
|
<a>1.0</a>
|
||||||
</emissive>
|
</emissive>
|
||||||
<object-group include="Materials/base/industrial-buildings.xml"/>
|
<object-group include="Materials/base/industrial-buildings.xml">
|
||||||
|
<object>
|
||||||
|
<path>Models/Industrial/Industrial110x185.xml</path>
|
||||||
|
<path>Models/Industrial/Industrial150x115.xml</path>
|
||||||
|
<path>Models/Industrial/Industrial85x160.xml</path>
|
||||||
|
<coverage-m2>5000</coverage-m2>
|
||||||
|
<heading-type>mask</heading-type>
|
||||||
|
<spacing-m>80</spacing-m>
|
||||||
|
</object>
|
||||||
|
</object-group>
|
||||||
|
<building-medium-max-floors>4</building-medium-max-floors>
|
||||||
<wood-coverage>1000.0</wood-coverage>
|
<wood-coverage>1000.0</wood-coverage>
|
||||||
<tree-texture>Trees/deciduous-alt.png</tree-texture>
|
<tree-texture>Trees/deciduous-alt.png</tree-texture>
|
||||||
<tree-varieties>8</tree-varieties>
|
<tree-varieties>8</tree-varieties>
|
||||||
|
@ -289,6 +303,7 @@
|
||||||
<name>Town</name>
|
<name>Town</name>
|
||||||
<name>SubUrban</name>
|
<name>SubUrban</name>
|
||||||
<effect>Effects/urban</effect>
|
<effect>Effects/urban</effect>
|
||||||
|
<tree-effect>Effects/tree-european-deciduous</tree-effect>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/town-europe-autumn.png</texture>
|
<texture>Terrain/town-europe-autumn.png</texture>
|
||||||
<texture n="2">Terrain/town-europe-relief-light.png</texture>
|
<texture n="2">Terrain/town-europe-relief-light.png</texture>
|
||||||
|
@ -371,6 +386,7 @@
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<effect>Effects/agriculture</effect>
|
<effect>Effects/agriculture</effect>
|
||||||
|
<tree-effect>Effects/tree-european-mixed</tree-effect>
|
||||||
<name>MixedCropPastureCover</name>
|
<name>MixedCropPastureCover</name>
|
||||||
<name>MixedCrop</name>
|
<name>MixedCrop</name>
|
||||||
<name>ComplexCrop</name>
|
<name>ComplexCrop</name>
|
||||||
|
@ -396,6 +412,7 @@
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<effect>Effects/agriculture</effect>
|
<effect>Effects/agriculture</effect>
|
||||||
|
<tree-effect>Effects/tree-european-mixed</tree-effect>
|
||||||
<name>DryCrop</name>
|
<name>DryCrop</name>
|
||||||
<name>DryCropPastureCover</name>
|
<name>DryCropPastureCover</name>
|
||||||
<name>GreenSpace</name>
|
<name>GreenSpace</name>
|
||||||
|
@ -421,6 +438,7 @@
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<effect>Effects/crop</effect>
|
<effect>Effects/crop</effect>
|
||||||
|
<tree-effect>Effects/tree-european-mixed</tree-effect>
|
||||||
<name>IrrCropPastureCover</name>
|
<name>IrrCropPastureCover</name>
|
||||||
<name>IrrCrop</name>
|
<name>IrrCrop</name>
|
||||||
<name>Orchard</name>
|
<name>Orchard</name>
|
||||||
|
@ -547,6 +565,7 @@
|
||||||
|
|
||||||
<material>
|
<material>
|
||||||
<effect>Effects/terrain-overlay</effect>
|
<effect>Effects/terrain-overlay</effect>
|
||||||
|
<tree-effect>Effects/tree-european-mixed</tree-effect>
|
||||||
<name>Grassland</name>
|
<name>Grassland</name>
|
||||||
<texture-set>
|
<texture-set>
|
||||||
<texture>Terrain/dry_pasture4.png</texture>
|
<texture>Terrain/dry_pasture4.png</texture>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<!-- North America -->
|
<!-- North America -->
|
||||||
<region include="Materials/regions/alaska.xml"/>
|
<region include="Materials/regions/alaska.xml"/>
|
||||||
<region include="Materials/regions/us_southwest.xml"/>
|
<region include="Materials/regions/us_southwest.xml"/>
|
||||||
<!--<region include="Materials/regions/california.xml"/>-->
|
<region include="Materials/regions/california.xml"/>
|
||||||
<region include="Materials/regions/sierras.xml"/>
|
<region include="Materials/regions/sierras.xml"/>
|
||||||
<region include="Materials/regions/florida.xml"/>
|
<region include="Materials/regions/florida.xml"/>
|
||||||
<region include="Materials/regions/bermuda.xml"/>
|
<region include="Materials/regions/bermuda.xml"/>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
inkscape:label="Layer 1"
|
inkscape:label="Layer 1"
|
||||||
inkscape:groupmode="layer">
|
inkscape:groupmode="layer">
|
||||||
<path
|
<path
|
||||||
d="m 38,58 l 0,-38 a 10,10 0 1 1 -20,0 l -5,-7 m5,7 l 8,-2"
|
d="m 38,58 l 0,-38 a 10,10 0 1 0 -20,0 l -5,-7 m5,7 l 8,-2"
|
||||||
id="path7043"
|
id="path7043"
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:55.40000153;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"/>
|
style="fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:55.40000153;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"/>
|
||||||
</g>
|
</g>
|
||||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -54,7 +54,7 @@
|
||||||
inkscape:groupmode="layer"
|
inkscape:groupmode="layer"
|
||||||
transform="matrix(-1,0,0,1,59,0)">
|
transform="matrix(-1,0,0,1,59,0)">
|
||||||
<path
|
<path
|
||||||
d="m 38,58 0,-38 a 10,10 0 1 1 -20,0 l -5,-7 m 5,7 8,-2"
|
d="m 38,58 0,-38 a 10,10 0 1 0 -20,0 l -5,-7 m 5,7 8,-2"
|
||||||
id="path7043"
|
id="path7043"
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:55.40000153;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
style="fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:55.40000153;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||||
inkscape:connector-curvature="0" />
|
inkscape:connector-curvature="0" />
|
||||||
|
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -262,9 +262,9 @@ var parsesvg = func(group, path, options = nil)
|
||||||
# SVG: (rx ry x-axis-rotation large-arc-flag sweep-flag x y)+
|
# SVG: (rx ry x-axis-rotation large-arc-flag sweep-flag x y)+
|
||||||
# OpenVG: rh,rv,rot,x0,y0
|
# OpenVG: rh,rv,rot,x0,y0
|
||||||
if( args[i + 3] )
|
if( args[i + 3] )
|
||||||
var cmd_vg = args[i + 4] ? Path.VG_LCCWARC_TO : Path.VG_LCWARC_TO;
|
var cmd_vg = args[i + 4] ? Path.VG_LCWARC_TO : Path.VG_LCCWARC_TO;
|
||||||
else
|
else
|
||||||
var cmd_vg = args[i + 4] ? Path.VG_SCCWARC_TO : Path.VG_SCWARC_TO;
|
var cmd_vg = args[i + 4] ? Path.VG_SCWARC_TO : Path.VG_SCCWARC_TO;
|
||||||
append(cmds, rel ? cmd_vg + 1: cmd_vg);
|
append(cmds, rel ? cmd_vg + 1: cmd_vg);
|
||||||
append(coords, args[i],
|
append(coords, args[i],
|
||||||
args[i + 1],
|
args[i + 1],
|
||||||
|
|
|
@ -1366,90 +1366,6 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
do_welcome = 0;
|
do_welcome = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
##
|
|
||||||
# overwrite custom shader settings when quality-level is set on startup
|
|
||||||
var qualityLevel = getprop("/sim/rendering/shaders/quality-level");
|
|
||||||
var rembrandtOn = getprop("/sim/rendering/rembrandt/enabled");
|
|
||||||
if (qualityLevel == -1) {
|
|
||||||
setprop("/sim/rendering/shaders/custom-settings",1);
|
|
||||||
}
|
|
||||||
elsif (qualityLevel != nil) {
|
|
||||||
setprop("/sim/rendering/shaders/custom-settings",0);
|
|
||||||
setprop("/sim/rendering/shaders/quality-level-internal",qualityLevel);
|
|
||||||
if (qualityLevel == 0) {
|
|
||||||
setprop("/sim/rendering/shaders/skydome",0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# overwrite custom shader settings when quality-level is set through the slider
|
|
||||||
# in the Rendering Options dialog
|
|
||||||
var update_shader_settings = func() {
|
|
||||||
var shaderPath = "/sim/rendering/shaders/";
|
|
||||||
if (getprop(shaderPath ~ "custom-settings")) {
|
|
||||||
setprop(shaderPath ~ "quality-level", -1);
|
|
||||||
} else {
|
|
||||||
var qualityLvl = getprop(shaderPath ~ "quality-level-internal") or 0;
|
|
||||||
setprop(shaderPath ~ "quality-level", qualityLvl);
|
|
||||||
|
|
||||||
if (qualityLvl < 2) {
|
|
||||||
# Non-ALS fallback
|
|
||||||
setprop(shaderPath ~ "skydome", 0.0);
|
|
||||||
setprop(shaderPath ~ "quality-level", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "landmass", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "urban", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "water", qualityLvl);
|
|
||||||
|
|
||||||
qualityLvl = math.min(qualityLvl, 4.0);
|
|
||||||
setprop(shaderPath ~ "lights", qualityLvl);
|
|
||||||
|
|
||||||
qualityLvl = math.min(qualityLvl, 1.0);
|
|
||||||
setprop(shaderPath ~ "model", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "contrails", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "crop", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "generic", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "transition", qualityLvl);
|
|
||||||
} else {
|
|
||||||
# ALS from quality 2 upwards
|
|
||||||
setprop(shaderPath ~ "skydome", 1.0);
|
|
||||||
|
|
||||||
if (qualityLvl != 0.0) {
|
|
||||||
setprop(shaderPath ~ "landmass", qualityLvl + 1); # these go to 6 rather than 5
|
|
||||||
setprop(shaderPath ~ "transition", qualityLvl + 1);
|
|
||||||
} else {
|
|
||||||
setprop(shaderPath ~ "landmass", 0);
|
|
||||||
setprop(shaderPath ~ "transition", 0);
|
|
||||||
}
|
|
||||||
setprop(shaderPath ~ "water", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "urban", qualityLvl);
|
|
||||||
|
|
||||||
if (qualityLvl >= 5.0) {
|
|
||||||
setprop(shaderPath ~ "vegetation-effects", qualityLvl);
|
|
||||||
} else {
|
|
||||||
setprop(shaderPath ~ "vegetation-effects", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
qualityLvl = math.min(qualityLvl, 4.0);
|
|
||||||
setprop(shaderPath ~ "lights", qualityLvl);
|
|
||||||
|
|
||||||
qualityLvl = math.min(qualityLvl, 3.0);
|
|
||||||
setprop(shaderPath ~ "model", qualityLvl);
|
|
||||||
|
|
||||||
qualityLvl = math.min(qualityLvl, 2.0);
|
|
||||||
setprop(shaderPath ~ "wind-effects", qualityLvl);
|
|
||||||
|
|
||||||
qualityLvl = math.min(qualityLvl, 1.0);
|
|
||||||
setprop(shaderPath ~ "crop", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "clouds", qualityLvl);
|
|
||||||
setprop(shaderPath ~ "forest", qualityLvl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
setlistener("/sim/rendering/shaders/custom-settings", func { update_shader_settings() } );
|
|
||||||
setlistener("/sim/rendering/shaders/quality-level-internal", func { update_shader_settings() } );
|
|
||||||
update_shader_settings();
|
|
||||||
|
|
||||||
screenHProp = props.globals.getNode("/sim/startup/ysize");
|
screenHProp = props.globals.getNode("/sim/startup/ysize");
|
||||||
|
|
||||||
props.globals.getNode("/sim/help/debug", 1).setValues(debug_keys);
|
props.globals.getNode("/sim/help/debug", 1).setValues(debug_keys);
|
||||||
|
@ -1554,4 +1470,4 @@ setlistener(
|
||||||
},
|
},
|
||||||
1, # init - trigger immediately.
|
1, # init - trigger immediately.
|
||||||
0, # type - trigger only when value changed.
|
0, # type - trigger only when value changed.
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,217 +0,0 @@
|
||||||
// This shader is mostly an adaptation of the shader found at
|
|
||||||
// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
|
|
||||||
// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
|
|
||||||
// © Michael Horsch - 2005
|
|
||||||
// Major update and revisions - 2011-10-07
|
|
||||||
// © Emilian Huminiuc and Vivian Meazza
|
|
||||||
// Optimisation - 2012-5-05
|
|
||||||
// © Emilian Huminiuc and Vivian Meazza
|
|
||||||
|
|
||||||
#version 120
|
|
||||||
#define fps2kts 0.5925
|
|
||||||
|
|
||||||
uniform sampler2D water_normalmap;
|
|
||||||
uniform sampler2D water_reflection;
|
|
||||||
uniform sampler2D water_dudvmap;
|
|
||||||
uniform sampler2D water_reflection_grey;
|
|
||||||
uniform sampler2D sea_foam;
|
|
||||||
uniform sampler2D alpha_tex;
|
|
||||||
uniform sampler2D bowwave_nmap;
|
|
||||||
|
|
||||||
uniform float saturation, Overcast, WindE, WindN, spd, hdg;
|
|
||||||
uniform float CloudCover0, CloudCover1, CloudCover2, CloudCover3, CloudCover4;
|
|
||||||
uniform int Status;
|
|
||||||
|
|
||||||
varying vec4 waterTex1; //moving texcoords
|
|
||||||
varying vec4 waterTex2; //moving texcoords
|
|
||||||
varying vec3 viewerdir;
|
|
||||||
varying vec3 lightdir;
|
|
||||||
varying vec3 normal;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
/////// functions /////////
|
|
||||||
|
|
||||||
float normalize_range(float _val)
|
|
||||||
{
|
|
||||||
if (_val > 180.0)
|
|
||||||
return _val - 360.0;
|
|
||||||
else
|
|
||||||
return _val;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void relWind(out float rel_wind_speed_kts, out float rel_wind_from_rad)
|
|
||||||
{
|
|
||||||
//calculate the carrier speed north and east in kts
|
|
||||||
float speed_north_kts = cos(radians(hdg)) * spd ;
|
|
||||||
float speed_east_kts = sin(radians(hdg)) * spd ;
|
|
||||||
|
|
||||||
//calculate the relative wind speed north and east in kts
|
|
||||||
float rel_wind_speed_from_east_kts = WindE*fps2kts + speed_east_kts;
|
|
||||||
float rel_wind_speed_from_north_kts = WindN*fps2kts + speed_north_kts;
|
|
||||||
|
|
||||||
//combine relative speeds north and east to get relative windspeed in kts
|
|
||||||
rel_wind_speed_kts = sqrt(rel_wind_speed_from_east_kts*rel_wind_speed_from_east_kts
|
|
||||||
+ rel_wind_speed_from_north_kts*rel_wind_speed_from_north_kts);
|
|
||||||
|
|
||||||
//calculate the relative wind direction
|
|
||||||
float rel_wind_from_deg = degrees(atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts));
|
|
||||||
// rel_wind_from_rad = atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts);
|
|
||||||
float rel_wind = rel_wind_from_deg - hdg;
|
|
||||||
rel_wind = normalize_range(rel_wind);
|
|
||||||
rel_wind_from_rad = radians(rel_wind);
|
|
||||||
}
|
|
||||||
|
|
||||||
void rotationmatrix(in float angle, out mat4 rotmat)
|
|
||||||
{
|
|
||||||
rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
|
|
||||||
sin( angle ), cos( angle ), 0.0, 0.0,
|
|
||||||
0.0 , 0.0 , 1.0, 0.0,
|
|
||||||
0.0 , 0.0 , 0.0, 1.0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
const vec4 sca = vec4(0.005, 0.005, 0.005, 0.005);
|
|
||||||
const vec4 sca2 = vec4(0.02, 0.02, 0.02, 0.02);
|
|
||||||
const vec4 tscale = vec4(0.25, 0.25, 0.25, 0.25);
|
|
||||||
|
|
||||||
mat4 RotationMatrix;
|
|
||||||
|
|
||||||
float relWindspd=0;
|
|
||||||
float relWinddir=0;
|
|
||||||
|
|
||||||
// compute relative wind speed and direction
|
|
||||||
relWind (relWindspd, relWinddir);
|
|
||||||
|
|
||||||
rotationmatrix(relWinddir, RotationMatrix);
|
|
||||||
|
|
||||||
// compute direction to viewer
|
|
||||||
vec3 E = normalize(viewerdir);
|
|
||||||
|
|
||||||
// compute direction to light source
|
|
||||||
vec3 L = normalize(lightdir);
|
|
||||||
|
|
||||||
// half vector
|
|
||||||
vec3 H = normalize(L + E);
|
|
||||||
|
|
||||||
const float water_shininess = 240.0;
|
|
||||||
// approximate cloud cover
|
|
||||||
float cover = 0.0;
|
|
||||||
//bool Status = true;
|
|
||||||
|
|
||||||
float windEffect = relWindspd; //wind speed in kt
|
|
||||||
// float windEffect = sqrt(pow(abs(WindE),2)+pow(abs(WindN),2)) * 0.6; //wind speed in kt
|
|
||||||
float windScale = 15.0/(5.0 + windEffect); //wave scale
|
|
||||||
float waveRoughness = 0.05 + smoothstep(0.0, 50.0, windEffect); //wave roughness filter
|
|
||||||
|
|
||||||
|
|
||||||
if (Status == 1){
|
|
||||||
cover = min(min(min(min(CloudCover0, CloudCover1),CloudCover2),CloudCover3),CloudCover4);
|
|
||||||
} else {
|
|
||||||
// hack to allow for Overcast not to be set by Local Weather
|
|
||||||
|
|
||||||
if (Overcast == 0){
|
|
||||||
cover = 5;
|
|
||||||
} else {
|
|
||||||
cover = Overcast * 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//vec4 viewt = normalize(waterTex4);
|
|
||||||
vec4 viewt = vec4(-E, 0.0) * 0.6;
|
|
||||||
|
|
||||||
vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale * 2.0) * 2.0 - 1.0;
|
|
||||||
vec4 dist = texture2D(water_dudvmap, vec2(waterTex1 + disdis*sca2)* windScale * 2.0) * 2.0 - 1.0;
|
|
||||||
vec4 fdist = normalize(dist);
|
|
||||||
fdist = -fdist;
|
|
||||||
fdist *= sca;
|
|
||||||
|
|
||||||
//normalmap
|
|
||||||
rotationmatrix(-relWinddir, RotationMatrix);
|
|
||||||
|
|
||||||
vec4 nmap0 = texture2D(water_normalmap, vec2((waterTex1 + disdis*sca2) * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0;
|
|
||||||
vec4 nmap2 = texture2D(water_normalmap, vec2(waterTex2 * tscale * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0;
|
|
||||||
vec4 nmap3 = texture2D(bowwave_nmap, gl_TexCoord[0].st) * 2.0 - 1.0;
|
|
||||||
vec4 vNorm = normalize(mix(nmap3, nmap0 + nmap2, 0.3 )* waveRoughness);
|
|
||||||
vNorm = -vNorm;
|
|
||||||
|
|
||||||
//load reflection
|
|
||||||
vec4 tmp = vec4(lightdir, 0.0);
|
|
||||||
vec4 refTex = texture2D(water_reflection, vec2(tmp + waterTex1) * 32.0) ;
|
|
||||||
vec4 refTexGrey = texture2D(water_reflection_grey, vec2(tmp + waterTex1) * 32.0) ;
|
|
||||||
vec4 refl ;
|
|
||||||
// cover = 0;
|
|
||||||
|
|
||||||
if(cover >= 1.5){
|
|
||||||
refl= normalize(refTex);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
refl = normalize(refTexGrey);
|
|
||||||
refl.r *= (0.75 + 0.15 * cover);
|
|
||||||
refl.g *= (0.80 + 0.15 * cover);
|
|
||||||
refl.b *= (0.875 + 0.125 * cover);
|
|
||||||
refl.a *= 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec3 N0 = vec3(texture2D(water_normalmap, vec2((waterTex1 + disdis*sca2)* RotationMatrix) * windScale * 2.0) * 2.0 - 1.0);
|
|
||||||
vec3 N1 = vec3(texture2D(water_normalmap, vec2(waterTex2 * tscale * RotationMatrix ) * windScale * 2.0) * 2.0 - 1.0);
|
|
||||||
vec3 N2 = vec3(texture2D(bowwave_nmap, gl_TexCoord[0].st)*2.0-1.0);
|
|
||||||
//vec3 Nf = normalize((normal+N0+N1)*waveRoughness);
|
|
||||||
vec3 N = normalize(mix(normal+N2, normal+N0+N1, 0.3)* waveRoughness);
|
|
||||||
N = -N;
|
|
||||||
|
|
||||||
// specular
|
|
||||||
vec3 specular_color = vec3(gl_LightSource[0].diffuse)
|
|
||||||
* pow(max(0.0, dot(N, H)), water_shininess) * 6.0;
|
|
||||||
vec4 specular = vec4(specular_color, 0.5);
|
|
||||||
|
|
||||||
specular = specular * saturation * 0.3;
|
|
||||||
|
|
||||||
//calculate fresnel
|
|
||||||
vec4 invfres = vec4( dot(vNorm, viewt) );
|
|
||||||
vec4 fres = vec4(1.0) + invfres;
|
|
||||||
refl *= fres;
|
|
||||||
|
|
||||||
vec4 alpha0 = texture2D(alpha_tex, gl_TexCoord[0].st);
|
|
||||||
|
|
||||||
//calculate final colour
|
|
||||||
vec4 ambient_light = gl_LightSource[0].diffuse;
|
|
||||||
vec4 finalColor;
|
|
||||||
|
|
||||||
// cover = 0;
|
|
||||||
|
|
||||||
if(cover >= 1.5){
|
|
||||||
finalColor = refl + specular;
|
|
||||||
} else {
|
|
||||||
finalColor = refl;
|
|
||||||
}
|
|
||||||
|
|
||||||
//add foam
|
|
||||||
|
|
||||||
float foamSlope = 0.05 + 0.01 * windScale;
|
|
||||||
//float waveSlope = mix(N0.g, N1.g, 0.25);
|
|
||||||
|
|
||||||
vec4 foam_texel = texture2D(sea_foam, vec2(waterTex2 * tscale) * 50.0);
|
|
||||||
float waveSlope = N.g;
|
|
||||||
|
|
||||||
if (windEffect >= 12.0)
|
|
||||||
if (waveSlope >= foamSlope){
|
|
||||||
finalColor = mix(finalColor, max(finalColor, finalColor + foam_texel), smoothstep(foamSlope, 0.5, N.g));
|
|
||||||
}
|
|
||||||
|
|
||||||
//generate final colour
|
|
||||||
finalColor *= ambient_light+ alpha0 * 0.35;
|
|
||||||
finalColor.rgb = fog_Func(finalColor.rgb, fogType);
|
|
||||||
gl_FragColor = vec4(finalColor.rgb, alpha0.a * 1.35);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
|
|
||||||
// Ambient term comes in gl_Color.rgb.
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
varying vec4 diffuse_term;
|
|
||||||
varying vec3 normal;
|
|
||||||
|
|
||||||
uniform sampler2D texture;
|
|
||||||
uniform sampler2D lightmap;
|
|
||||||
uniform float sunangle;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
float luminance(vec3 color)
|
|
||||||
{
|
|
||||||
return dot(vec3(0.212671, 0.715160, 0.072169), color);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec3 n;
|
|
||||||
float NdotL, NdotHV, fogFactor;
|
|
||||||
vec4 color = gl_Color;
|
|
||||||
vec3 lightDir = gl_LightSource[0].position.xyz;
|
|
||||||
vec3 halfVector = gl_LightSource[0].halfVector.xyz;
|
|
||||||
vec4 texel;
|
|
||||||
vec4 emissive;
|
|
||||||
vec4 fragColor;
|
|
||||||
vec4 specular = vec4(0.0);
|
|
||||||
|
|
||||||
// If gl_Color.a == 0, this is a back-facing polygon and the
|
|
||||||
// normal should be reversed.
|
|
||||||
n = (2.0 * gl_Color.a - 1.0) * normal;
|
|
||||||
n = normalize(n);
|
|
||||||
|
|
||||||
NdotL = dot(n, lightDir);
|
|
||||||
if (NdotL > 0.0) {
|
|
||||||
color += diffuse_term * NdotL;
|
|
||||||
NdotHV = max(dot(n, halfVector), 0.0);
|
|
||||||
if (gl_FrontMaterial.shininess > 0.0)
|
|
||||||
specular.rgb = (gl_FrontMaterial.specular.rgb
|
|
||||||
* gl_LightSource[0].specular.rgb
|
|
||||||
* pow(NdotHV, gl_FrontMaterial.shininess));
|
|
||||||
}
|
|
||||||
color.a = diffuse_term.a;
|
|
||||||
// This shouldn't be necessary, but our lighting becomes very
|
|
||||||
// saturated. Clamping the color before modulating by the texture
|
|
||||||
// is closer to what the OpenGL fixed function pipeline does.
|
|
||||||
color = clamp(color, 0.0, 1.0);
|
|
||||||
texel = texture2D(texture, gl_TexCoord[0].st);
|
|
||||||
emissive = texture2D(lightmap, gl_TexCoord[0].st);
|
|
||||||
|
|
||||||
// The lights are only switched on when the sun is below the horizon
|
|
||||||
fragColor = color * texel + specular + smoothstep(1.6, 1.8, sunangle) * emissive;
|
|
||||||
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
|
||||||
|
|
||||||
gl_FragColor = fragColor;
|
|
||||||
}
|
|
|
@ -1,122 +0,0 @@
|
||||||
// -*- mode: C; -*-
|
|
||||||
// RANDOM BUILDINGS for the UBERSHADER vertex shader
|
|
||||||
// Licence: GPL v2
|
|
||||||
// © Emilian Huminiuc and Vivian Meazza 2011
|
|
||||||
#version 120
|
|
||||||
#extension GL_EXT_draw_instanced : enable
|
|
||||||
|
|
||||||
varying vec4 diffuseColor;
|
|
||||||
varying vec3 VBinormal;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 VTangent;
|
|
||||||
varying vec3 eyeVec;
|
|
||||||
varying vec3 normal;
|
|
||||||
|
|
||||||
uniform int refl_dynamic;
|
|
||||||
uniform int nmap_enabled;
|
|
||||||
uniform int shader_qual;
|
|
||||||
|
|
||||||
attribute vec3 instancePosition; // (x,y,z)
|
|
||||||
attribute vec3 instanceScale; // (width, depth, height)
|
|
||||||
attribute vec3 attrib1; // Generic packed attributes
|
|
||||||
attribute vec3 attrib2;
|
|
||||||
|
|
||||||
const float c_precision = 128.0;
|
|
||||||
const float c_precisionp1 = c_precision + 1.0;
|
|
||||||
|
|
||||||
vec3 float2vec(float value) {
|
|
||||||
vec3 val;
|
|
||||||
val.x = mod(value, c_precisionp1) / c_precision;
|
|
||||||
val.y = mod(floor(value / c_precisionp1), c_precisionp1) / c_precision;
|
|
||||||
val.z = floor(value / (c_precisionp1 * c_precisionp1)) / c_precision;
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
// Unpack generic attributes
|
|
||||||
vec3 attr1 = float2vec(attrib1.x);
|
|
||||||
vec3 attr2 = float2vec(attrib1.z);
|
|
||||||
vec3 attr3 = float2vec(attrib2.x);
|
|
||||||
|
|
||||||
// Determine the rotation for the building.
|
|
||||||
float sr = sin(6.28 * attr1.x);
|
|
||||||
float cr = cos(6.28 * attr1.x);
|
|
||||||
|
|
||||||
vec3 position = gl_Vertex.xyz;
|
|
||||||
// Adjust the very top of the roof to match the rooftop scaling. This shapes
|
|
||||||
// the rooftop - gambled, gabled etc. These vertices are identified by gl_Color.z
|
|
||||||
position.x = (1.0 - gl_Color.z) * position.x + gl_Color.z * ((position.x + 0.5) * attr3.z - 0.5);
|
|
||||||
position.y = (1.0 - gl_Color.z) * position.y + gl_Color.z * (position.y * attrib2.y );
|
|
||||||
|
|
||||||
// Adjust pitch of roof to the correct height. These vertices are identified by gl_Color.z
|
|
||||||
// Scale down by the building height (instanceScale.z) because
|
|
||||||
// immediately afterwards we will scale UP the vertex to the correct scale.
|
|
||||||
position.z = position.z + gl_Color.z * attrib1.y / instanceScale.z;
|
|
||||||
position = position * instanceScale.xyz;
|
|
||||||
|
|
||||||
// Rotation of the building and movement into position
|
|
||||||
position.xy = vec2(dot(position.xy, vec2(cr, sr)), dot(position.xy, vec2(-sr, cr)));
|
|
||||||
position = position + instancePosition.xyz;
|
|
||||||
|
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(position,1.0);
|
|
||||||
vec4 ecPosition = gl_ModelViewMatrix * vec4(position, 1.0);
|
|
||||||
|
|
||||||
eyeVec = ecPosition.xyz;
|
|
||||||
|
|
||||||
// Rotate the normal.
|
|
||||||
normal = gl_Normal;
|
|
||||||
|
|
||||||
// Rotate the normal as per the building.
|
|
||||||
normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr)));
|
|
||||||
vec3 n = normalize(normal);
|
|
||||||
|
|
||||||
vec3 c1 = cross(n, vec3(0.0,0.0,1.0));
|
|
||||||
vec3 c2 = cross(n, vec3(0.0,1.0,0.0));
|
|
||||||
VNormal = normalize(gl_NormalMatrix * normal);
|
|
||||||
|
|
||||||
VTangent = c1;
|
|
||||||
if(length(c2)>length(c1)){
|
|
||||||
VTangent = c2;
|
|
||||||
}
|
|
||||||
|
|
||||||
VBinormal = cross(n, VTangent);
|
|
||||||
|
|
||||||
VTangent = normalize(gl_NormalMatrix * -VTangent);
|
|
||||||
VBinormal = normalize(gl_NormalMatrix * VBinormal);
|
|
||||||
|
|
||||||
// Force no alpha on random buildings
|
|
||||||
diffuseColor = vec4(gl_FrontMaterial.diffuse.rgb,1.0);
|
|
||||||
|
|
||||||
gl_FrontColor = gl_FrontMaterial.emission + vec4(1.0)
|
|
||||||
* (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
||||||
|
|
||||||
gl_ClipVertex = ecPosition;
|
|
||||||
|
|
||||||
// Texture coordinates are stored as:
|
|
||||||
// - a separate offset (x0, y0) for the wall (wtex0x, wtex0y), and roof (rtex0x, rtex0y)
|
|
||||||
// - a semi-shared (x1, y1) so that the front and side of the building can have
|
|
||||||
// different texture mappings
|
|
||||||
//
|
|
||||||
// The vertex color value selects between them:
|
|
||||||
// gl_Color.x=1 indicates front/back walls
|
|
||||||
// gl_Color.y=1 indicates roof
|
|
||||||
// gl_Color.z=1 indicates top roof vertexs (used above)
|
|
||||||
// gl_Color.a=1 indicates sides
|
|
||||||
// Finally, the roof texture is on the right of the texture sheet
|
|
||||||
float wtex0x = attr1.y; // Front/Side texture X0
|
|
||||||
float wtex0y = attr1.z; // Front/Side texture Y0
|
|
||||||
float rtex0x = attr2.z; // Roof texture X0
|
|
||||||
float rtex0y = attr3.x; // Roof texture Y0
|
|
||||||
float wtex1x = attr2.x; // Front/Roof texture X1
|
|
||||||
float stex1x = attr3.y; // Side texture X1
|
|
||||||
float wtex1y = attr2.y; // Front/Roof/Side texture Y1
|
|
||||||
vec2 tex0 = vec2(sign(gl_MultiTexCoord0.x) * (gl_Color.x*wtex0x + gl_Color.y*rtex0x + gl_Color.a*wtex0x),
|
|
||||||
gl_Color.x*wtex0y + gl_Color.y*rtex0y + gl_Color.a*wtex0y);
|
|
||||||
|
|
||||||
vec2 tex1 = vec2(gl_Color.x*wtex1x + gl_Color.y*wtex1x + gl_Color.a*stex1x,
|
|
||||||
wtex1y);
|
|
||||||
|
|
||||||
gl_TexCoord[0].x = tex0.x + gl_MultiTexCoord0.x * tex1.x;
|
|
||||||
gl_TexCoord[0].y = tex0.y + gl_MultiTexCoord0.y * tex1.y;
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
// -*- mode: C; -*-
|
|
||||||
// Licence: GPL v2
|
|
||||||
// Author: Frederic Bouvier
|
|
||||||
#version 120
|
|
||||||
//varying float fogCoord;
|
|
||||||
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 VTangent;
|
|
||||||
varying vec3 VBinormal;
|
|
||||||
|
|
||||||
uniform sampler2D tex_color;
|
|
||||||
uniform sampler2D tex_normal;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
void main (void)
|
|
||||||
{
|
|
||||||
vec4 ns = texture2D(tex_normal, gl_TexCoord[0].st);
|
|
||||||
vec3 N = ns.rgb * 2.0 - 1.0;
|
|
||||||
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
|
||||||
|
|
||||||
float nDotVP = max(0.0, dot(N, normalize(gl_LightSource[0].position.xyz)));
|
|
||||||
float nDotHV = max(0.0, dot(N, gl_LightSource[0].halfVector.xyz));
|
|
||||||
|
|
||||||
float pf;
|
|
||||||
if (nDotHV == 0.0)
|
|
||||||
pf = 0.0;
|
|
||||||
else
|
|
||||||
pf = pow(nDotHV, gl_FrontMaterial.shininess);
|
|
||||||
|
|
||||||
vec4 Diffuse = gl_LightSource[0].diffuse * nDotVP;
|
|
||||||
vec4 Specular = gl_LightSource[0].specular * pf;
|
|
||||||
|
|
||||||
vec4 color = gl_Color + Diffuse * gl_FrontMaterial.diffuse;
|
|
||||||
color *= texture2D(tex_color, gl_TexCoord[0].xy);
|
|
||||||
|
|
||||||
color += Specular * gl_FrontMaterial.specular * ns.a;
|
|
||||||
color = clamp( color, 0.0, 1.0 );
|
|
||||||
|
|
||||||
|
|
||||||
// float fogFactor;
|
|
||||||
// const float LOG2 = 1.442695;
|
|
||||||
// fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
|
|
||||||
// fogFactor = clamp(fogFactor, 0.0, 1.0);
|
|
||||||
// gl_FragColor = mix(gl_Fog.color, color, fogFactor);
|
|
||||||
|
|
||||||
color.rgb = fog_Func(color.rgb, fogType);
|
|
||||||
gl_FragColor = color;
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
// -*- mode: C; -*-
|
|
||||||
// Licence: GPL v2
|
|
||||||
// Author: Frederic Bouvier
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
//varying float fogCoord;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 VTangent;
|
|
||||||
varying vec3 VBinormal;
|
|
||||||
|
|
||||||
attribute vec3 tangent;
|
|
||||||
attribute vec3 binormal;
|
|
||||||
|
|
||||||
void main (void)
|
|
||||||
{
|
|
||||||
// vec4 pos = gl_ModelViewMatrix * gl_Vertex;
|
|
||||||
// fogCoord = pos.z / pos.w;
|
|
||||||
|
|
||||||
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
|
||||||
VTangent = normalize(gl_NormalMatrix * tangent);
|
|
||||||
VBinormal = normalize(gl_NormalMatrix * binormal);
|
|
||||||
|
|
||||||
gl_FrontColor = gl_FrontLightModelProduct.sceneColor + gl_LightSource[0].ambient * gl_FrontMaterial.ambient;
|
|
||||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
||||||
gl_Position = ftransform();
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
uniform sampler2D baseTexture;
|
|
||||||
|
|
||||||
varying float fogFactor;
|
|
||||||
varying float distanceFactor;
|
|
||||||
varying vec2 texCoord;
|
|
||||||
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
|
||||||
vec4 finalColor = base * gl_Color;
|
|
||||||
gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor);
|
|
||||||
gl_FragColor.a = mix(0.0, finalColor.a, distanceFactor);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,99 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
varying float fogFactor;
|
|
||||||
varying float distanceFactor;
|
|
||||||
|
|
||||||
uniform sampler3D Noise;
|
|
||||||
|
|
||||||
uniform float scale_x;
|
|
||||||
uniform float scale_y;
|
|
||||||
uniform float scale_z;
|
|
||||||
|
|
||||||
uniform float offset_x;
|
|
||||||
uniform float offset_y;
|
|
||||||
uniform float offset_z;
|
|
||||||
|
|
||||||
uniform float fade_max;
|
|
||||||
uniform float fade_min;
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
vec4 rawpos = gl_Vertex;
|
|
||||||
|
|
||||||
float shade = 0.9;
|
|
||||||
float cloud_height = 30000.0;
|
|
||||||
|
|
||||||
// map noise vectors
|
|
||||||
vec4 noisevec = texture3D(Noise, rawpos.xyz);
|
|
||||||
float noise0 = (noisevec.r * 2.0) - 1.0;
|
|
||||||
float noise1 =(noisevec.g * 2.0) - 1.0;
|
|
||||||
vec2 noise2 = noisevec.xy;
|
|
||||||
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
//gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(textureIndexX, textureIndexY, 0.0, 0.0);
|
|
||||||
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
|
|
||||||
vec4 l = gl_ModelViewMatrixInverse * vec4(0.0,0.0,1.0,1.0);
|
|
||||||
vec3 u = normalize(ep.xyz - l.xyz);
|
|
||||||
|
|
||||||
// Find a rotation matrix that rotates 1,0,0 into u. u, r and w are
|
|
||||||
// the columns of that matrix.
|
|
||||||
vec3 absu = abs(u);
|
|
||||||
vec3 r = normalize(vec3(-u.y, u.x, 0.0));
|
|
||||||
vec3 w = cross(u, r);
|
|
||||||
|
|
||||||
// Do the matrix multiplication by [ u r w pos]. Scale
|
|
||||||
// the x component first
|
|
||||||
gl_Position = vec4(gl_Vertex.x * scale_x, 0.0, 0.0, 1.0);
|
|
||||||
gl_Position.xyz += gl_Vertex.x * u;
|
|
||||||
gl_Position.xyz += gl_Vertex.y * r * scale_y;
|
|
||||||
gl_Position.xyz += gl_Vertex.z * w * scale_z;
|
|
||||||
|
|
||||||
// Adjust the position post-rotation and scaling
|
|
||||||
gl_Position.yz -= 3.0/2.0;
|
|
||||||
|
|
||||||
// Offset in y and z directions using a random noise factor
|
|
||||||
float offset_Y = (noise0 * offset_y) + offset_y/2.0;
|
|
||||||
float offset_Z = (noise0 * offset_z) + offset_z/2.0;
|
|
||||||
|
|
||||||
distanceFactor = 1.0 - clamp(abs(noise0), fade_min, fade_max);
|
|
||||||
// distanceFactor = 0.5;
|
|
||||||
|
|
||||||
gl_Position.y += offset_Y;
|
|
||||||
gl_Position.z += offset_Z;
|
|
||||||
|
|
||||||
gl_Position.xyz += gl_Color.xyz;
|
|
||||||
|
|
||||||
// Determine a lighting normal based on the vertex position from the
|
|
||||||
// center of the cloud, so that sprite on the opposite side of the cloud to the sun are darker.
|
|
||||||
float n = dot(normalize(-gl_LightSource[0].position.xyz),
|
|
||||||
normalize(mat3x3(gl_ModelViewMatrix) * (- gl_Position.xyz)));;
|
|
||||||
|
|
||||||
// Determine the position - used for fog and shading calculations
|
|
||||||
vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Position);
|
|
||||||
float fogCoord = abs(ecPosition.z);
|
|
||||||
float fract = smoothstep(0.0, cloud_height, gl_Position.z + cloud_height);
|
|
||||||
|
|
||||||
// Final position of the sprite
|
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Position;
|
|
||||||
|
|
||||||
// Calculate the total offset distance in the yx plane, normalised
|
|
||||||
/*float distance = normalize(sqrt(pow(gl_Position.y, 2) + pow(gl_Position.z, 2)));
|
|
||||||
distanceFactor = 1.0 - clamp(distance, 0.5, 1.0);*/
|
|
||||||
// Determine the shading of the sprite based on its vertical position and position relative to the sun.
|
|
||||||
n = min(smoothstep(-0.5, 0.0, n), fract);
|
|
||||||
|
|
||||||
// Determine the shading based on a mixture from the backlight to the front
|
|
||||||
vec4 backlight = gl_LightSource[0].diffuse * shade;
|
|
||||||
|
|
||||||
gl_FrontColor = mix(backlight, gl_LightSource[0].diffuse, n);
|
|
||||||
gl_FrontColor += gl_FrontLightModelProduct.sceneColor;
|
|
||||||
|
|
||||||
// As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
|
|
||||||
gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(60000.0, 80000.0, fogCoord));
|
|
||||||
gl_BackColor = gl_FrontColor;
|
|
||||||
|
|
||||||
// Fog doesn't affect clouds as much as other objects.
|
|
||||||
fogFactor = exp( -gl_Fog.density * fogCoord);
|
|
||||||
fogFactor = clamp(fogFactor, 0.0, 1.0);
|
|
||||||
}
|
|
|
@ -1,83 +0,0 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
varying vec4 rawpos;
|
|
||||||
varying vec4 ecPosition;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 Normal;
|
|
||||||
|
|
||||||
uniform sampler3D NoiseTex;
|
|
||||||
uniform sampler2D SampleTex;
|
|
||||||
uniform sampler1D ColorsTex;
|
|
||||||
|
|
||||||
varying vec4 constantColor;
|
|
||||||
|
|
||||||
uniform float snowlevel; // From /sim/rendering/snow-level-m
|
|
||||||
|
|
||||||
const float scale = 1.0;
|
|
||||||
|
|
||||||
#define BLA 1
|
|
||||||
#define BLA2 0
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
float getShadowing();
|
|
||||||
vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel);
|
|
||||||
|
|
||||||
void main (void)
|
|
||||||
{
|
|
||||||
|
|
||||||
vec4 basecolor = texture2D(SampleTex, rawpos.xy*0.000144);
|
|
||||||
basecolor = texture1D(ColorsTex, basecolor.r+0.00);
|
|
||||||
|
|
||||||
vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale);
|
|
||||||
|
|
||||||
vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale);
|
|
||||||
vec4 km = floor((rawpos)/1000.0);
|
|
||||||
|
|
||||||
float fogFactor;
|
|
||||||
float fogCoord = ecPosition.z;
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
|
|
||||||
// float biasFactor = exp2(-0.00000002 * fogCoord * fogCoord * LOG2);
|
|
||||||
float biasFactor = fogFactor = clamp(fogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
float n=0.06;
|
|
||||||
n += nvL[0]*0.4;
|
|
||||||
n += nvL[1]*0.6;
|
|
||||||
n += nvL[2]*2.0;
|
|
||||||
n += nvL[3]*4.0;
|
|
||||||
n += noisevec[0]*0.1;
|
|
||||||
n += noisevec[1]*0.4;
|
|
||||||
|
|
||||||
n += noisevec[2]*0.8;
|
|
||||||
n += noisevec[3]*2.1;
|
|
||||||
n = mix(0.6, n, biasFactor);
|
|
||||||
|
|
||||||
// good
|
|
||||||
vec4 c1;
|
|
||||||
c1 = basecolor * vec4(smoothstep(0.0, 1.15, n), smoothstep(0.0, 1.2, n), smoothstep(0.1, 1.3, n), 1.0);
|
|
||||||
|
|
||||||
//"steep = gray"
|
|
||||||
c1 = mix(vec4(n-0.42, n-0.44, n-0.51, 1.0), c1, smoothstep(0.970, 0.990, abs(normalize(Normal).z)+nvL[2]*1.3));
|
|
||||||
|
|
||||||
//"snow"
|
|
||||||
c1 = mix(c1, clamp(n+nvL[2]*4.1+vec4(0.1, 0.1, nvL[2]*2.2, 1.0), 0.7, 1.0), smoothstep(snowlevel+300.0, snowlevel+360.0, (rawpos.z)+nvL[1]*3000.0));
|
|
||||||
|
|
||||||
vec3 diffuse = gl_Color.rgb * max(0.0, dot(VNormal, gl_LightSource[0].position.xyz)) * getShadowing();
|
|
||||||
vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * vec4(diffuse, 1.0);
|
|
||||||
|
|
||||||
c1 *= ambient_light;
|
|
||||||
vec4 finalColor = c1;
|
|
||||||
finalColor.rgb += getClusteredLightsContribution(ecPosition.xyz, VNormal, basecolor.rgb);
|
|
||||||
|
|
||||||
// if(gl_Fog.density == 1.0)
|
|
||||||
// fogFactor=1.0;
|
|
||||||
//
|
|
||||||
// gl_FragColor = mix(gl_Fog.color ,finalColor, fogFactor);
|
|
||||||
finalColor.rgb = fog_Func(finalColor.rgb, fogType);
|
|
||||||
gl_FragColor = finalColor;
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
varying vec4 rawpos;
|
|
||||||
varying vec4 ecPosition;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 Normal;
|
|
||||||
varying vec4 constantColor;
|
|
||||||
|
|
||||||
void setupShadows(vec4 eyeSpacePos);
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
||||||
|
|
||||||
rawpos = gl_Vertex;
|
|
||||||
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
||||||
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
|
||||||
Normal = normalize(gl_Normal);
|
|
||||||
|
|
||||||
gl_FrontColor = gl_Color;
|
|
||||||
|
|
||||||
constantColor = gl_FrontMaterial.emission
|
|
||||||
+ gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
||||||
|
|
||||||
gl_Position = ftransform();
|
|
||||||
|
|
||||||
setupShadows(ecPosition);
|
|
||||||
}
|
|
|
@ -1,146 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
// © Vivian Meazza - 2011
|
|
||||||
|
|
||||||
// Shader that uses OpenGL state values to do per-pixel lighting
|
|
||||||
//
|
|
||||||
// The only light used is gl_LightSource[0], which is assumed to be
|
|
||||||
// directional.
|
|
||||||
//
|
|
||||||
// Diffuse colors come from the gl_Color, ambient from the material. This is
|
|
||||||
// equivalent to osg::Material::DIFFUSE.
|
|
||||||
|
|
||||||
#version 120
|
|
||||||
#define fps2kts 0.5925
|
|
||||||
|
|
||||||
#define MODE_OFF 0
|
|
||||||
#define MODE_DIFFUSE 1
|
|
||||||
#define MODE_AMBIENT_AND_DIFFUSE 2
|
|
||||||
|
|
||||||
// The ambient term of the lighting equation that doesn't depend on
|
|
||||||
// the surface normal is passed in gl_{Front,Back}Color. The alpha
|
|
||||||
// component is set to 1 for front, 0 for back in order to work around
|
|
||||||
// bugs with gl_FrontFacing in the fragment shader.
|
|
||||||
varying vec4 diffuse_term;
|
|
||||||
varying vec3 normal;
|
|
||||||
//varying float fogCoord;
|
|
||||||
varying vec4 ecPosition;
|
|
||||||
|
|
||||||
uniform int colorMode;
|
|
||||||
uniform float osg_SimulationTime;
|
|
||||||
uniform float Offset, AmpFactor, WindE, WindN, spd, hdg;
|
|
||||||
uniform sampler3D Noise;
|
|
||||||
|
|
||||||
////fog "include"////////
|
|
||||||
//uniform int fogType;
|
|
||||||
//
|
|
||||||
//void fog_Func(int type);
|
|
||||||
/////////////////////////
|
|
||||||
|
|
||||||
void setupShadows(vec4 eyeSpacePos);
|
|
||||||
|
|
||||||
/////// functions /////////
|
|
||||||
|
|
||||||
float normalize_range(float _val)
|
|
||||||
{
|
|
||||||
if (_val > 180.0)
|
|
||||||
return _val - 360.0;
|
|
||||||
else
|
|
||||||
return _val;
|
|
||||||
}
|
|
||||||
|
|
||||||
void relWind(out float rel_wind_speed_kts, out float rel_wind_from_rad)
|
|
||||||
{
|
|
||||||
//calculate speed north and east in kts
|
|
||||||
float speed_north_kts = cos(radians(hdg)) * spd ;
|
|
||||||
float speed_east_kts = sin(radians(hdg)) * spd ;
|
|
||||||
|
|
||||||
//calculate the relative wind speed north and east in kts
|
|
||||||
float rel_wind_speed_from_east_kts = WindE*fps2kts + speed_east_kts;
|
|
||||||
float rel_wind_speed_from_north_kts = WindN*fps2kts + speed_north_kts;
|
|
||||||
|
|
||||||
//combine relative speeds north and east to get relative windspeed in kts
|
|
||||||
rel_wind_speed_kts = sqrt(pow(abs(rel_wind_speed_from_east_kts), 2.0)
|
|
||||||
+ pow(abs(rel_wind_speed_from_north_kts), 2.0));
|
|
||||||
|
|
||||||
//calculate the relative wind direction
|
|
||||||
float rel_wind_from_deg = degrees(atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts));
|
|
||||||
//rel_wind_from_rad = atan(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts);
|
|
||||||
float rel_wind = rel_wind_from_deg - hdg;
|
|
||||||
rel_wind = normalize_range(rel_wind);
|
|
||||||
rel_wind_from_rad = radians(rel_wind);
|
|
||||||
}
|
|
||||||
|
|
||||||
void rotationmatrix(in float angle, out mat4 rotmat)
|
|
||||||
{
|
|
||||||
rotmat = mat4( cos( angle ), -sin( angle ), 0.0, 0.0,
|
|
||||||
sin( angle ), cos( angle ), 0.0, 0.0,
|
|
||||||
0.0 , 0.0 , 1.0, 0.0,
|
|
||||||
0.0 , 0.0 , 0.0, 1.0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
mat4 RotationMatrix;
|
|
||||||
|
|
||||||
float relWindspd=0.0;
|
|
||||||
float relWinddir=0.0;
|
|
||||||
|
|
||||||
// compute relative wind speed and direction
|
|
||||||
relWind (relWindspd, relWinddir);
|
|
||||||
|
|
||||||
// map noise vector
|
|
||||||
vec4 noisevec = texture3D(Noise, gl_Vertex.xyz);
|
|
||||||
|
|
||||||
//waving effect
|
|
||||||
float tsec = osg_SimulationTime;
|
|
||||||
vec4 pos = gl_Vertex;
|
|
||||||
vec4 oldpos = gl_Vertex;
|
|
||||||
|
|
||||||
float freq = (10.0 * relWindspd) + 10.0;
|
|
||||||
pos.y = sin((pos.x * 5.0 + tsec * freq )/5.0) * 0.5 ;
|
|
||||||
pos.y += sin((pos.z * 5.0 + tsec * freq/2.0)/5.0) * 0.125 ;
|
|
||||||
|
|
||||||
pos.y *= pow(pos.x - Offset, 2.0) * AmpFactor;
|
|
||||||
|
|
||||||
//rotate the flag to align with relative wind
|
|
||||||
rotationmatrix(-relWinddir, RotationMatrix);
|
|
||||||
pos *= RotationMatrix;
|
|
||||||
gl_Position = gl_ModelViewProjectionMatrix * pos;
|
|
||||||
|
|
||||||
//do the colour and fog
|
|
||||||
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
||||||
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
normal = gl_NormalMatrix * gl_Normal;
|
|
||||||
vec4 ambient_color, diffuse_color;
|
|
||||||
|
|
||||||
if (colorMode == MODE_DIFFUSE) {
|
|
||||||
diffuse_color = gl_Color;
|
|
||||||
ambient_color = gl_FrontMaterial.ambient;
|
|
||||||
} else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
|
|
||||||
diffuse_color = gl_Color;
|
|
||||||
ambient_color = gl_Color;
|
|
||||||
} else {
|
|
||||||
diffuse_color = gl_FrontMaterial.diffuse;
|
|
||||||
ambient_color = gl_FrontMaterial.ambient;
|
|
||||||
}
|
|
||||||
|
|
||||||
diffuse_term = diffuse_color * gl_LightSource[0].diffuse;
|
|
||||||
vec4 ambient_term = ambient_color * gl_LightSource[0].ambient;
|
|
||||||
|
|
||||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
|
||||||
// transparency animation is at work
|
|
||||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
|
||||||
diffuse_term.a = gl_FrontMaterial.diffuse.a;
|
|
||||||
else
|
|
||||||
diffuse_term.a = gl_Color.a;
|
|
||||||
|
|
||||||
// Another hack for supporting two-sided lighting without using
|
|
||||||
// gl_FrontFacing in the fragment shader.
|
|
||||||
gl_FrontColor.rgb = ambient_term.rgb; gl_FrontColor.a = 0.0;
|
|
||||||
gl_BackColor.rgb = ambient_term.rgb; gl_FrontColor.a = 1.0;
|
|
||||||
// fogCoord = abs(ecPosition.z / ecPosition.w);
|
|
||||||
|
|
||||||
//fog_Func(fogType);
|
|
||||||
setupShadows(ecPosition);
|
|
||||||
}
|
|
|
@ -1,197 +0,0 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
varying vec4 rawpos;
|
|
||||||
varying vec4 ecPosition;
|
|
||||||
varying vec3 VTangent;
|
|
||||||
varying vec3 VBinormal;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 Normal;
|
|
||||||
|
|
||||||
uniform sampler3D NoiseTex;
|
|
||||||
uniform sampler2D SampleTex;
|
|
||||||
uniform sampler1D ColorsTex;
|
|
||||||
uniform sampler2D SampleTex2;
|
|
||||||
uniform sampler2D NormalTex;
|
|
||||||
uniform float depth_factor;
|
|
||||||
|
|
||||||
uniform float red, green, blue, alpha;
|
|
||||||
|
|
||||||
uniform float quality_level; // From /sim/rendering/quality-level
|
|
||||||
uniform float snowlevel; // From /sim/rendering/snow-level-m
|
|
||||||
|
|
||||||
const float scale = 1.0;
|
|
||||||
int linear_search_steps = 10;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
float getShadowing();
|
|
||||||
vec3 getClusteredLightsContribution(vec3 p, vec3 n, vec3 texel);
|
|
||||||
|
|
||||||
float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds)
|
|
||||||
{
|
|
||||||
|
|
||||||
float size = 1.0 / float(linear_search_steps);
|
|
||||||
float depth = 0.0;
|
|
||||||
float best_depth = 1.0;
|
|
||||||
|
|
||||||
for(int i = 0; i < linear_search_steps - 1; ++i)
|
|
||||||
{
|
|
||||||
depth += size;
|
|
||||||
float t = texture2D(reliefMap, dp + ds * depth).a;
|
|
||||||
if(best_depth > 0.996)
|
|
||||||
if(depth >= t)
|
|
||||||
best_depth = depth;
|
|
||||||
}
|
|
||||||
depth = best_depth;
|
|
||||||
|
|
||||||
const int binary_search_steps = 5;
|
|
||||||
|
|
||||||
for(int i = 0; i < binary_search_steps; ++i)
|
|
||||||
{
|
|
||||||
size *= 0.5;
|
|
||||||
float t = texture2D(reliefMap, dp + ds * depth).a;
|
|
||||||
if(depth >= t)
|
|
||||||
{
|
|
||||||
best_depth = depth;
|
|
||||||
depth -= 2.0 * size;
|
|
||||||
}
|
|
||||||
depth += size;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(best_depth);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void main (void)
|
|
||||||
{
|
|
||||||
float bump = 1.0;
|
|
||||||
|
|
||||||
if ( quality_level >= 3.5 ) {
|
|
||||||
linear_search_steps = 20;
|
|
||||||
}
|
|
||||||
vec2 uv, dp, ds;
|
|
||||||
vec3 N;
|
|
||||||
float d;
|
|
||||||
if ( bump > 0.9 && quality_level >= 2.0 )
|
|
||||||
{
|
|
||||||
vec3 V = normalize(ecPosition.xyz);
|
|
||||||
float a = dot(VNormal, -V);
|
|
||||||
vec2 s = vec2(dot(V, VTangent), dot(V, VBinormal));
|
|
||||||
s *= depth_factor / a;
|
|
||||||
ds = s;
|
|
||||||
dp = gl_TexCoord[0].st;
|
|
||||||
d = ray_intersect(NormalTex, dp, ds);
|
|
||||||
|
|
||||||
uv = dp + ds * d;
|
|
||||||
N = texture2D(NormalTex, uv).xyz * 2.0 - 1.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
uv = gl_TexCoord[0].st;
|
|
||||||
N = vec3(0.0, 0.0, 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
vec4 basecolor = texture2D(SampleTex, rawpos.xy*0.000344);
|
|
||||||
vec4 basecolor2 = texture2D(SampleTex2, rawpos.xy*0.000144);
|
|
||||||
|
|
||||||
basecolor = texture1D(ColorsTex, basecolor.r+0.0);
|
|
||||||
|
|
||||||
vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale);
|
|
||||||
|
|
||||||
vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale);
|
|
||||||
|
|
||||||
float vegetationlevel = (rawpos.z)+nvL[2]*3000.0;
|
|
||||||
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
float fogCoord = abs(ecPosition.z / ecPosition.w);
|
|
||||||
float fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
|
|
||||||
float biasFactor = exp2(-0.00000002 * fogCoord * fogCoord * LOG2);
|
|
||||||
|
|
||||||
float n = 0.06;
|
|
||||||
n += nvL[0]*0.4;
|
|
||||||
n += nvL[1]*0.6;
|
|
||||||
n += nvL[2]*2.0;
|
|
||||||
n += nvL[3]*4.0;
|
|
||||||
n += noisevec[0]*0.1;
|
|
||||||
n += noisevec[1]*0.4;
|
|
||||||
|
|
||||||
n += noisevec[2]*0.8;
|
|
||||||
n += noisevec[3]*2.1;
|
|
||||||
|
|
||||||
//very low n/biasFactor mix, to keep forest color
|
|
||||||
n = mix(0.05, n, biasFactor);
|
|
||||||
|
|
||||||
vec4 c1;
|
|
||||||
c1 = basecolor * vec4(smoothstep(-1.3, 0.5, n), smoothstep(-1.3, 0.5, n), smoothstep(-2.0, 0.9, n), 0.0);
|
|
||||||
|
|
||||||
vec4 c2;
|
|
||||||
c2 = basecolor2 * vec4(smoothstep(-1.3, 0.5, n), smoothstep(-1.3, 0.5, n), smoothstep(-2.0, 0.9, n), 0.0);
|
|
||||||
|
|
||||||
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
|
||||||
vec3 l = gl_LightSource[0].position.xyz;
|
|
||||||
vec3 diffuse;
|
|
||||||
|
|
||||||
//draw floor where !steep, and another blurb for smoothing transitions
|
|
||||||
vec4 c3, c4, c5, c3a, c4a, c5a;
|
|
||||||
float subred = 1.0 - red; float subgreen = 1.0 - green; float subblue = 1.0 - blue;
|
|
||||||
c3 = mix(vec4(n-subred, n-subgreen, -n-subblue, 0.0), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.3));
|
|
||||||
c4 = mix(vec4(n-subred, n-subgreen-0.6, -n-subblue, 0.0), c1, smoothstep(0.990, 0.890, abs(normalize(Normal).z)+nvL[2]*0.9));
|
|
||||||
c4a = mix(vec4(n-subred+0.12, n-subgreen-0.52, -n-subblue, 0.3), c1, smoothstep(0.990, 0.970, abs(normalize(Normal).z)+nvL[2]*1.32));
|
|
||||||
c5 = mix(c3, c4, 1.0);
|
|
||||||
c5a = mix(c3, c4a, 1.0);
|
|
||||||
|
|
||||||
|
|
||||||
if (vegetationlevel <= 2200.0) {
|
|
||||||
c1 = mix(c2, c5, clamp(0.65, n*0.1, 0.5));
|
|
||||||
diffuse = gl_Color.rgb * max(0.7, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vegetationlevel > 2200.0 && vegetationlevel < 2300.0) {
|
|
||||||
c1 = mix(c2, c5, clamp(0.65, n*0.5, 0.35));
|
|
||||||
diffuse = gl_Color.rgb * max(0.7, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vegetationlevel >= 2300.0 && vegetationlevel < 2480.0) {
|
|
||||||
c1 = mix(c2, c5a, clamp(0.65, n*0.5, 0.30));
|
|
||||||
diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vegetationlevel >= 2480.0 && vegetationlevel < 2530.0) {
|
|
||||||
c1 = mix(c2, c5a, clamp(0.65, n*0.5, 0.20));
|
|
||||||
diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vegetationlevel >= 2530.0 && vegetationlevel < 2670.0) {
|
|
||||||
c1 = mix(c2, c5, clamp(0.65, n*0.5, 0.10));
|
|
||||||
diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vegetationlevel >= 2670.0) {
|
|
||||||
c1 = mix(c2, c5, clamp(0.0, n*0.1, 0.4));
|
|
||||||
diffuse = gl_Color.rgb * max(0.85, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//adding snow and permanent snow/glacier
|
|
||||||
if (vegetationlevel > snowlevel) {
|
|
||||||
c3 = mix(vec4(n+1.0, n+1.0, n+1.0, 0.0), c1, smoothstep(0.990, 0.965, abs(normalize(Normal).z)+nvL[2]*1.3));
|
|
||||||
c4 = mix(vec4(n+1.0, n+1.0, n+1.0, 0.0), c1, smoothstep(0.990, 0.965, abs(normalize(Normal).z)+nvL[2]*0.9));
|
|
||||||
c5 = mix(c3, c4, 1.0);
|
|
||||||
c1 = mix(c1, c5, clamp(0.65, n*0.5, 0.6));
|
|
||||||
diffuse = gl_Color.rgb * max(0.8, dot(N, l)) * max(0.9, dot(VNormal, gl_LightSource[0].position.xyz));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 ambient_light = gl_LightSource[0].diffuse * vec4(diffuse, 0.0) * getShadowing();
|
|
||||||
|
|
||||||
c1 *= ambient_light;
|
|
||||||
vec4 finalColor = c1;
|
|
||||||
finalColor.rgb += getClusteredLightsContribution(ecPosition.xyz, VNormal, basecolor.rgb);
|
|
||||||
|
|
||||||
finalColor.rgb = fog_Func(finalColor.rgb, fogType);
|
|
||||||
gl_FragColor = finalColor;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
#version 120
|
|
||||||
varying vec4 rawpos;
|
|
||||||
varying vec4 ecPosition;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 VTangent;
|
|
||||||
varying vec3 VBinormal;
|
|
||||||
varying vec3 Normal;
|
|
||||||
varying vec4 constantColor;
|
|
||||||
|
|
||||||
attribute vec3 tangent;
|
|
||||||
attribute vec3 binormal;
|
|
||||||
|
|
||||||
// ////fog "include"////////
|
|
||||||
// uniform int fogType;
|
|
||||||
//
|
|
||||||
// void fog_Func(int type);
|
|
||||||
// /////////////////////////
|
|
||||||
|
|
||||||
void setupShadows(vec4 eyeSpacePos);
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
rawpos = gl_Vertex;
|
|
||||||
ecPosition = gl_ModelViewMatrix * rawpos;
|
|
||||||
Normal = normalize(gl_Normal);
|
|
||||||
VNormal = gl_NormalMatrix * gl_Normal;
|
|
||||||
VTangent = gl_NormalMatrix * tangent;
|
|
||||||
VBinormal = gl_NormalMatrix * binormal;
|
|
||||||
|
|
||||||
gl_FrontColor = gl_Color;
|
|
||||||
constantColor = gl_FrontMaterial.emission
|
|
||||||
+ gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
||||||
gl_Position = ftransform();
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
// fog_Func(fogType);
|
|
||||||
setupShadows(ecPosition);
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
// "landmass" effect with forest construction using a geometry
|
|
||||||
// shader. The landmass effect includes a bumpmap effect as well as
|
|
||||||
// variation by altitude.
|
|
||||||
//
|
|
||||||
// The fragment shader needs position and normals in model and eye
|
|
||||||
// coordinates. This vertex shader calculates the positions and
|
|
||||||
// normals of the forest polygons so the geometry shader can do as
|
|
||||||
// little as possible.
|
|
||||||
|
|
||||||
// Input for the geometry shader. "raw" means terrain model
|
|
||||||
// coordinates; that's a tile-local coordinate system, with z as local
|
|
||||||
// up. "ec" means eye coordinates.
|
|
||||||
|
|
||||||
// model position of original terrain poly; the bottom of the forest.
|
|
||||||
varying vec4 rawposIn;
|
|
||||||
// model normal
|
|
||||||
varying vec3 NormalIn;
|
|
||||||
varying vec4 ecPosIn;
|
|
||||||
varying vec3 ecNormalIn;
|
|
||||||
// eye spacce tangent and binormal
|
|
||||||
varying vec3 VTangentIn;
|
|
||||||
varying vec3 VBinormalIn;
|
|
||||||
// screen-space position of top
|
|
||||||
// constant color component
|
|
||||||
varying vec4 constantColorIn;
|
|
||||||
|
|
||||||
attribute vec3 tangent;
|
|
||||||
attribute vec3 binormal;
|
|
||||||
|
|
||||||
uniform float canopy_height;
|
|
||||||
|
|
||||||
////fog "include"////////
|
|
||||||
// uniform int fogType;
|
|
||||||
//
|
|
||||||
// void fog_Func(int type);
|
|
||||||
/////////////////////////
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
rawposIn = gl_Vertex;
|
|
||||||
ecPosIn = gl_ModelViewMatrix * gl_Vertex;
|
|
||||||
NormalIn = normalize(gl_Normal);
|
|
||||||
//rawTopIn = rawposIn + vec4(0.0, 0.0, canopy_height, 0.0);
|
|
||||||
//ecTopIn = gl_ModelViewMatrix * rawTopIn;
|
|
||||||
ecNormalIn = gl_NormalMatrix * NormalIn;
|
|
||||||
VTangentIn = gl_NormalMatrix * tangent;
|
|
||||||
VBinormalIn = gl_NormalMatrix * binormal;
|
|
||||||
|
|
||||||
gl_FrontColor = gl_Color;
|
|
||||||
gl_Position = ftransform();
|
|
||||||
//positionTopIn = gl_ModelViewProjectionMatrix * rawTopIn;
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
constantColorIn = gl_FrontMaterial.emission
|
|
||||||
+ gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
||||||
|
|
||||||
// fog_Func(fogType);
|
|
||||||
}
|
|
|
@ -1,152 +0,0 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
varying vec4 rawpos;
|
|
||||||
varying vec4 ecPosition;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 VTangent;
|
|
||||||
varying vec3 VBinormal;
|
|
||||||
varying vec3 Normal;
|
|
||||||
varying vec4 constantColor;
|
|
||||||
|
|
||||||
uniform sampler3D NoiseTex;
|
|
||||||
uniform sampler2D BaseTex;
|
|
||||||
uniform sampler2D NormalTex;
|
|
||||||
uniform float depth_factor;
|
|
||||||
uniform float quality_level; // From /sim/rendering/quality-level
|
|
||||||
uniform float snowlevel; // From /sim/rendering/snow-level-m
|
|
||||||
|
|
||||||
const float scale = 1.0;
|
|
||||||
int linear_search_steps = 10;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds)
|
|
||||||
{
|
|
||||||
|
|
||||||
float size = 1.0 / float(linear_search_steps);
|
|
||||||
float depth = 0.0;
|
|
||||||
float best_depth = 1.0;
|
|
||||||
|
|
||||||
for(int i = 0; i < linear_search_steps - 1; ++i)
|
|
||||||
{
|
|
||||||
depth += size;
|
|
||||||
float t = texture2D(reliefMap, dp + ds * depth).a;
|
|
||||||
if(best_depth > 0.996)
|
|
||||||
if(depth >= t)
|
|
||||||
best_depth = depth;
|
|
||||||
}
|
|
||||||
depth = best_depth;
|
|
||||||
|
|
||||||
const int binary_search_steps = 5;
|
|
||||||
|
|
||||||
for(int i = 0; i < binary_search_steps; ++i)
|
|
||||||
{
|
|
||||||
size *= 0.5;
|
|
||||||
float t = texture2D(reliefMap, dp + ds * depth).a;
|
|
||||||
if(depth >= t)
|
|
||||||
{
|
|
||||||
best_depth = depth;
|
|
||||||
depth -= 2.0 * size;
|
|
||||||
}
|
|
||||||
depth += size;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(best_depth);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main (void)
|
|
||||||
{
|
|
||||||
float bump = 1.0;
|
|
||||||
|
|
||||||
if ( quality_level >= 3.0 ) {
|
|
||||||
linear_search_steps = 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec2 uv, dp = vec2(0, 0), ds = vec2(0, 0);
|
|
||||||
vec3 N;
|
|
||||||
float d = 0;
|
|
||||||
if ( bump > 0.9 && quality_level > 2.0 && quality_level <= 4.0)
|
|
||||||
{
|
|
||||||
vec3 V = normalize(ecPosition.xyz);
|
|
||||||
float a = dot(VNormal, -V);
|
|
||||||
vec2 s = vec2(dot(V, VTangent), dot(V, VBinormal));
|
|
||||||
|
|
||||||
// prevent a divide by zero
|
|
||||||
if (a > -1e-3 && a < 1e-3) a = 1e-3;
|
|
||||||
s *= depth_factor / a;
|
|
||||||
ds = s;
|
|
||||||
dp = gl_TexCoord[0].st;
|
|
||||||
d = ray_intersect(NormalTex, dp, ds);
|
|
||||||
|
|
||||||
uv = dp + ds * d;
|
|
||||||
N = texture2D(NormalTex, uv).xyz * 2.0 - 1.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
uv = gl_TexCoord[0].st;
|
|
||||||
N = vec3(0.0, 0.0, 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 noisevec = texture3D(NoiseTex, (rawpos.xyz)*0.01*scale);
|
|
||||||
vec4 nvL = texture3D(NoiseTex, (rawpos.xyz)*0.00066*scale);
|
|
||||||
|
|
||||||
float fogFactor;
|
|
||||||
float fogCoord = ecPosition.z;
|
|
||||||
const float LOG2 = 1.442695;
|
|
||||||
fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord * LOG2);
|
|
||||||
float biasFactor = fogFactor = clamp(fogFactor, 0.0, 1.0);
|
|
||||||
|
|
||||||
float n=0.06;
|
|
||||||
n += nvL[0]*0.4;
|
|
||||||
n += nvL[1]*0.6;
|
|
||||||
n += nvL[2]*2.0;
|
|
||||||
n += nvL[3]*4.0;
|
|
||||||
n += noisevec[0]*0.1;
|
|
||||||
n += noisevec[1]*0.4;
|
|
||||||
|
|
||||||
n += noisevec[2]*0.8;
|
|
||||||
n += noisevec[3]*2.1;
|
|
||||||
n = mix(0.6, n, biasFactor);
|
|
||||||
// good
|
|
||||||
vec4 c1 = texture2D(BaseTex, uv);
|
|
||||||
//brown
|
|
||||||
//c1 = mix(c1, vec4(n-0.46, n-0.45, n-0.53, 1.0), smoothstep(0.50, 0.55, nvL[2]*6.6));
|
|
||||||
//"steep = gray"
|
|
||||||
c1 = mix(vec4(n-0.30, n-0.29, n-0.37, 1.0), c1, smoothstep(0.970, 0.990, abs(normalize(Normal).z)+nvL[2]*1.3));
|
|
||||||
//"snow"
|
|
||||||
c1 = mix(c1, clamp(n+nvL[2]*4.1+vec4(0.1, 0.1, nvL[2]*2.2, 1.0), 0.7, 1.0), smoothstep(snowlevel+300.0, snowlevel+360.0, (rawpos.z)+nvL[1]*3000.0));
|
|
||||||
|
|
||||||
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
|
||||||
vec3 l = gl_LightSource[0].position.xyz;
|
|
||||||
vec3 diffuse = gl_Color.rgb * max(0.0, dot(N, l));
|
|
||||||
float shadow_factor = 1.0;
|
|
||||||
|
|
||||||
// Shadow
|
|
||||||
if ( quality_level >= 3.0 ) {
|
|
||||||
dp += ds * d;
|
|
||||||
vec3 sl = normalize( vec3( dot( l, VTangent ), dot( l, VBinormal ), dot( -l, VNormal ) ) );
|
|
||||||
ds = sl.xy * depth_factor / sl.z;
|
|
||||||
dp -= ds * d;
|
|
||||||
float dl = ray_intersect(NormalTex, dp, ds);
|
|
||||||
if ( dl < d - 0.05 )
|
|
||||||
shadow_factor = dot( constantColor.xyz, vec3( 1.0, 1.0, 1.0 ) ) * 0.25;
|
|
||||||
}
|
|
||||||
// end shadow
|
|
||||||
|
|
||||||
vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, 1.0);
|
|
||||||
|
|
||||||
c1 *= ambient_light;
|
|
||||||
vec4 finalColor = c1;
|
|
||||||
|
|
||||||
//if(gl_Fog.density == 1.0)
|
|
||||||
// fogFactor=1.0;
|
|
||||||
|
|
||||||
// gl_FragColor = mix(gl_Fog.color ,finalColor, fogFactor);
|
|
||||||
finalColor.rgb = fog_Func(finalColor.rgb, fogType);
|
|
||||||
gl_FragColor = finalColor;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,124 +0,0 @@
|
||||||
#version 120
|
|
||||||
#extension GL_EXT_geometry_shader4 : enable
|
|
||||||
|
|
||||||
// Geometry shader that creates a prism from a terrain triangle,
|
|
||||||
// resulting in a forest effect.
|
|
||||||
//
|
|
||||||
// A geometry shader should do as little computation as possible.
|
|
||||||
|
|
||||||
// See landmass-g.vert for a description of the inputs.
|
|
||||||
varying in vec4 rawposIn[3];
|
|
||||||
varying in vec3 NormalIn[3];
|
|
||||||
varying in vec4 ecPosIn[3];
|
|
||||||
varying in vec3 ecNormalIn[3];
|
|
||||||
varying in vec3 VTangentIn[3];
|
|
||||||
varying in vec3 VBinormalIn[3];
|
|
||||||
varying in vec4 constantColorIn[3];
|
|
||||||
|
|
||||||
uniform float canopy_height;
|
|
||||||
|
|
||||||
// model position
|
|
||||||
varying out vec4 rawpos;
|
|
||||||
// eye position
|
|
||||||
varying out vec4 ecPosition;
|
|
||||||
// eye space surface matrix
|
|
||||||
varying out vec3 VNormal;
|
|
||||||
varying out vec3 VTangent;
|
|
||||||
varying out vec3 VBinormal;
|
|
||||||
// model normal
|
|
||||||
varying out vec3 Normal;
|
|
||||||
varying out vec4 constantColor;
|
|
||||||
varying out float bump;
|
|
||||||
|
|
||||||
// Emit one vertex of the forest geometry.
|
|
||||||
// parameters:
|
|
||||||
// i - index into original terrain triangle
|
|
||||||
void doVertex(in int i, in vec4 pos, in vec4 ecpos, in vec4 screenpos,
|
|
||||||
in vec3 rawNormal, in vec3 normal, in float s)
|
|
||||||
{
|
|
||||||
rawpos = pos;
|
|
||||||
ecPosition = ecpos;
|
|
||||||
Normal = rawNormal;
|
|
||||||
VNormal = normal;
|
|
||||||
VTangent = VTangentIn[i];
|
|
||||||
VBinormal = VBinormalIn[i];
|
|
||||||
bump = s;
|
|
||||||
|
|
||||||
gl_FrontColor = gl_FrontColorIn[i];
|
|
||||||
constantColor = constantColorIn[i];
|
|
||||||
gl_Position = screenpos;
|
|
||||||
gl_TexCoord[0] = gl_TexCoordIn[i][0];
|
|
||||||
EmitVertex();
|
|
||||||
}
|
|
||||||
|
|
||||||
vec3 rawSideNormal[3];
|
|
||||||
vec3 sideNormal[3];
|
|
||||||
|
|
||||||
// Emit a vertex for a forest side triangle
|
|
||||||
void doSideVertex(in int vertIdx, in int sideIdx, vec4 pos, in vec4 ecpos,
|
|
||||||
in vec4 screenpos)
|
|
||||||
{
|
|
||||||
doVertex(vertIdx, pos, ecpos, screenpos, rawSideNormal[sideIdx],
|
|
||||||
sideNormal[sideIdx], 0.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
vec4 rawTopDisp = vec4(0.0, 0.0, canopy_height, 0.0);
|
|
||||||
vec4 ecTopDisp = gl_ModelViewMatrix * rawTopDisp;
|
|
||||||
vec4 mvpTopDisp = gl_ModelViewProjectionMatrix * rawTopDisp;
|
|
||||||
// model forest top
|
|
||||||
vec4 rawTopIn[3];
|
|
||||||
vec4 ecTopIn[3];
|
|
||||||
vec4 positionTopIn[3];
|
|
||||||
rawSideNormal[0] = normalize(cross((rawposIn[1] - rawposIn[0]).xyz,
|
|
||||||
NormalIn[0]));
|
|
||||||
rawSideNormal[1] = normalize(cross((rawposIn[2] - rawposIn[1]).xyz,
|
|
||||||
NormalIn[1]));
|
|
||||||
rawSideNormal[2] = normalize(cross((rawposIn[0] - rawposIn[2]).xyz,
|
|
||||||
NormalIn[2]));
|
|
||||||
for (int i = 0; i < 3; ++i) {
|
|
||||||
sideNormal[i] = gl_NormalMatrix * rawSideNormal[i];
|
|
||||||
rawTopIn[i] = rawposIn[i] + rawTopDisp;
|
|
||||||
ecTopIn[i] = ecPosIn[i] + ecTopDisp;
|
|
||||||
positionTopIn[i] = gl_PositionIn[i] + mvpTopDisp;
|
|
||||||
}
|
|
||||||
if (canopy_height > 0.01) {
|
|
||||||
// Sides
|
|
||||||
doSideVertex(0, 0, rawTopIn[0], ecTopIn[0], positionTopIn[0]);
|
|
||||||
doSideVertex(0, 0, rawposIn[0], ecPosIn[0], gl_PositionIn[0]);
|
|
||||||
doSideVertex(1, 0, rawTopIn[1], ecTopIn[1], positionTopIn[1]);
|
|
||||||
doSideVertex(1, 0, rawposIn[1], ecPosIn[1], gl_PositionIn[1]);
|
|
||||||
|
|
||||||
doSideVertex(2, 1, rawTopIn[2], ecTopIn[2], positionTopIn[2]);
|
|
||||||
doSideVertex(2, 1, rawposIn[2], ecPosIn[2], gl_PositionIn[2]);
|
|
||||||
|
|
||||||
doSideVertex(0, 2, rawTopIn[0], ecTopIn[0], positionTopIn[0]);
|
|
||||||
doSideVertex(0, 2, rawposIn[0], ecPosIn[0], gl_PositionIn[0]);
|
|
||||||
// Degenerate triangles; avoids EndPrimitive()
|
|
||||||
doSideVertex(0, 2, rawposIn[0], ecPosIn[0], gl_PositionIn[0]);
|
|
||||||
doVertex(0, rawTopIn[0], ecTopIn[0], positionTopIn[0], NormalIn[0],
|
|
||||||
ecNormalIn[0], 1.0);
|
|
||||||
// Top
|
|
||||||
}
|
|
||||||
doVertex(0, rawTopIn[0], ecTopIn[0], positionTopIn[0], NormalIn[0],
|
|
||||||
ecNormalIn[0], 1.0);
|
|
||||||
doVertex(1, rawTopIn[1], ecTopIn[1], positionTopIn[1], NormalIn[1],
|
|
||||||
ecNormalIn[1], 1.0);
|
|
||||||
doVertex(2, rawTopIn[2], ecTopIn[2], positionTopIn[2], NormalIn[2],
|
|
||||||
ecNormalIn[2], 1.0);
|
|
||||||
// Don't render "bottom" triangle for now; it's hidden.
|
|
||||||
#if 0
|
|
||||||
// degenerate
|
|
||||||
doVertex(2, rawTopIn[2], ecTopIn[2], positionTopIn[2], NormalIn[2],
|
|
||||||
ecNormalIn[2], 1.0);
|
|
||||||
// bottom
|
|
||||||
doVertex(0, rawposIn[0], ecPosIn[0], gl_PositionIn[0], NormalIn[0],
|
|
||||||
ecNormalIn[0], 1.0);
|
|
||||||
doVertex(1, rawposIn[1], ecPosIn[1], gl_PositionIn[1], NormalIn[1],
|
|
||||||
ecNormalIn[1], 1.0);
|
|
||||||
doVertex(2, rawposIn[2], ecPosIn[2], gl_PositionIn[2], NormalIn[2],
|
|
||||||
ecNormalIn[2], 1.0);
|
|
||||||
#endif
|
|
||||||
EndPrimitive();
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
#version 120
|
|
||||||
|
|
||||||
varying vec4 rawpos;
|
|
||||||
varying vec4 ecPosition;
|
|
||||||
varying vec3 VNormal;
|
|
||||||
varying vec3 VTangent;
|
|
||||||
varying vec3 VBinormal;
|
|
||||||
varying vec3 Normal;
|
|
||||||
varying vec4 constantColor;
|
|
||||||
|
|
||||||
attribute vec3 tangent;
|
|
||||||
attribute vec3 binormal;
|
|
||||||
|
|
||||||
// ////fog "include" /////
|
|
||||||
// uniform int fogType;
|
|
||||||
//
|
|
||||||
// void fog_Func(int type);
|
|
||||||
//
|
|
||||||
// //////////////////////
|
|
||||||
|
|
||||||
void main(void)
|
|
||||||
{
|
|
||||||
rawpos = gl_Vertex;
|
|
||||||
ecPosition = gl_ModelViewMatrix * rawpos;
|
|
||||||
Normal = normalize(gl_Normal);
|
|
||||||
VNormal = gl_NormalMatrix * gl_Normal;
|
|
||||||
VTangent = gl_NormalMatrix * tangent;
|
|
||||||
VBinormal = gl_NormalMatrix * binormal;
|
|
||||||
|
|
||||||
gl_FrontColor = gl_Color;
|
|
||||||
constantColor = gl_FrontMaterial.emission
|
|
||||||
+ gl_FrontColor * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
||||||
gl_Position = ftransform();
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
|
|
||||||
// fog_Func(fogType);
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
#version 120
|
|
||||||
//varying float fogCoord;
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 fragColor = gl_FrontMaterial.ambient;
|
|
||||||
// float fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
|
|
||||||
// gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
|
|
||||||
gl_FragColor = fragColor;
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
#version 120
|
|
||||||
// varying float fogCoord;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
// vec3 ecPosition = vec3(gl_ModelViewMatrix * gl_Vertex);
|
|
||||||
|
|
||||||
gl_Position = ftransform();
|
|
||||||
// fogCoord = abs(ecPosition.z);
|
|
||||||
}
|
|
|
@ -1,75 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
// Ambient term comes in gl_Color.rgb.
|
|
||||||
//
|
|
||||||
// See http://wiki.flightgear.org/index.php/Howto:_Lightmap for details on
|
|
||||||
// how to use it.
|
|
||||||
|
|
||||||
varying vec4 diffuse_term;
|
|
||||||
varying vec3 normal;
|
|
||||||
//varying float fogCoord;
|
|
||||||
|
|
||||||
uniform sampler2D texture;
|
|
||||||
|
|
||||||
// lightmap options
|
|
||||||
uniform float condition;
|
|
||||||
uniform float lightmap_factor;
|
|
||||||
uniform sampler2D lightmap_texture;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
float luminance(vec3 color)
|
|
||||||
{
|
|
||||||
return dot(vec3(0.212671, 0.715160, 0.072169), color);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec3 n, halfV;
|
|
||||||
float NdotL, NdotHV, fogFactor;
|
|
||||||
vec4 color = gl_Color;
|
|
||||||
vec3 lightDir = gl_LightSource[0].position.xyz;
|
|
||||||
vec3 halfVector = gl_LightSource[0].halfVector.xyz;
|
|
||||||
vec4 texel;
|
|
||||||
vec4 fragColor;
|
|
||||||
vec4 specular = vec4(0.0);
|
|
||||||
n = normalize(normal);
|
|
||||||
// If gl_Color.a == 0, this is a back-facing polygon and the
|
|
||||||
// normal should be reversed.
|
|
||||||
|
|
||||||
n = (2.0 * gl_Color.a - 1.0) * n;
|
|
||||||
NdotL = max(dot(n, lightDir), 0.0);
|
|
||||||
if (NdotL > 0.0) {
|
|
||||||
color += diffuse_term * NdotL;
|
|
||||||
halfV = halfVector;
|
|
||||||
NdotHV = max(dot(n, halfV), 0.0);
|
|
||||||
if (gl_FrontMaterial.shininess > 0.0)
|
|
||||||
specular.rgb = (gl_FrontMaterial.specular.rgb
|
|
||||||
* gl_LightSource[0].specular.rgb
|
|
||||||
* pow(NdotHV, gl_FrontMaterial.shininess));
|
|
||||||
}
|
|
||||||
color.a = diffuse_term.a;
|
|
||||||
// This shouldn't be necessary, but our lighting becomes very
|
|
||||||
// saturated. Clamping the color before modulating by the texture
|
|
||||||
// is closer to what the OpenGL fixed function pipeline does.
|
|
||||||
color = clamp(color, 0.0, 1.0);
|
|
||||||
texel = texture2D(texture, gl_TexCoord[0].st);
|
|
||||||
fragColor = color * texel + specular;
|
|
||||||
|
|
||||||
// The lightmap function
|
|
||||||
if ( condition >= 1.0 ) {
|
|
||||||
vec3 lightmapTexel = texture2D(lightmap_texture, gl_TexCoord[0].st).rgb * lightmap_factor;
|
|
||||||
fragColor.rgb = max(fragColor.rgb, lightmapTexel * gl_FrontMaterial.diffuse.rgb * texel.rgb);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
|
|
||||||
// gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
|
|
||||||
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
|
||||||
gl_FragColor = fragColor;
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
// Shader that uses OpenGL state values to do per-pixel lighting
|
|
||||||
//
|
|
||||||
// The only light used is gl_LightSource[0], which is assumed to be
|
|
||||||
// directional.
|
|
||||||
//
|
|
||||||
// Diffuse colors come from the gl_Color, ambient from the material. This is
|
|
||||||
// equivalent to osg::Material::DIFFUSE.
|
|
||||||
//
|
|
||||||
// See http://wiki.flightgear.org/index.php/Howto:_Lightmap for details on
|
|
||||||
// how to use it.
|
|
||||||
|
|
||||||
#define MODE_OFF 0
|
|
||||||
#define MODE_DIFFUSE 1
|
|
||||||
#define MODE_AMBIENT_AND_DIFFUSE 2
|
|
||||||
|
|
||||||
// The constant term of the lighting equation that doesn't depend on
|
|
||||||
// the surface normal is passed in gl_{Front,Back}Color. The alpha
|
|
||||||
// component is set to 1 for front, 0 for back in order to work around
|
|
||||||
// bugs with gl_FrontFacing in the fragment shader.
|
|
||||||
varying vec4 diffuse_term;
|
|
||||||
varying vec3 normal;
|
|
||||||
//varying float fogCoord;
|
|
||||||
uniform int colorMode;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
||||||
gl_Position = ftransform();
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
normal = gl_NormalMatrix * gl_Normal;
|
|
||||||
vec4 ambient_color, diffuse_color;
|
|
||||||
if (colorMode == MODE_DIFFUSE) {
|
|
||||||
diffuse_color = gl_Color;
|
|
||||||
ambient_color = gl_FrontMaterial.ambient;
|
|
||||||
} else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
|
|
||||||
diffuse_color = gl_Color;
|
|
||||||
ambient_color = gl_Color;
|
|
||||||
} else {
|
|
||||||
diffuse_color = gl_FrontMaterial.diffuse;
|
|
||||||
ambient_color = gl_FrontMaterial.ambient;
|
|
||||||
}
|
|
||||||
diffuse_term = diffuse_color * gl_LightSource[0].diffuse;
|
|
||||||
vec4 constant_term = gl_FrontMaterial.emission + ambient_color *
|
|
||||||
(gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
||||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
|
||||||
// transparency animation is at work
|
|
||||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
|
||||||
diffuse_term.a = gl_FrontMaterial.diffuse.a;
|
|
||||||
else
|
|
||||||
diffuse_term.a = gl_Color.a;
|
|
||||||
// Another hack for supporting two-sided lighting without using
|
|
||||||
// gl_FrontFacing in the fragment shader.
|
|
||||||
gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0;
|
|
||||||
gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0;
|
|
||||||
//fogCoord = abs(ecPosition.z / ecPosition.w);
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
// Shader for use with material animations
|
|
||||||
varying vec4 diffuse, constantColor, matSpecular;
|
|
||||||
varying vec3 normal;
|
|
||||||
//varying float fogCoord, alpha;
|
|
||||||
varying float alpha;
|
|
||||||
|
|
||||||
uniform sampler2D texture;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec3 n, halfV;
|
|
||||||
float NdotL, NdotHV, fogFactor;
|
|
||||||
vec4 color = constantColor;
|
|
||||||
vec3 lightDir = gl_LightSource[0].position.xyz;
|
|
||||||
vec3 halfVector = gl_LightSource[0].halfVector.xyz;
|
|
||||||
vec4 texel;
|
|
||||||
vec4 fragColor;
|
|
||||||
vec4 specular = vec4(0.0);
|
|
||||||
n = normalize(normal);
|
|
||||||
if (!gl_FrontFacing)
|
|
||||||
n = -n;
|
|
||||||
NdotL = max(dot(n, lightDir), 0.0);
|
|
||||||
if (NdotL > 0.0) {
|
|
||||||
color += diffuse * NdotL;
|
|
||||||
halfV = normalize(halfVector);
|
|
||||||
NdotHV = max(dot(n, halfV), 0.0);
|
|
||||||
if (gl_FrontMaterial.shininess > 0.0)
|
|
||||||
specular.rgb = (matSpecular.rgb
|
|
||||||
* gl_LightSource[0].specular.rgb
|
|
||||||
* pow(NdotHV, gl_FrontMaterial.shininess));
|
|
||||||
}
|
|
||||||
color.a = alpha;
|
|
||||||
// This shouldn't be necessary, but our lighting becomes very
|
|
||||||
// saturated. Clamping the color before modulating by the texture
|
|
||||||
// is closer to what the OpenGL fixed function pipeline does.
|
|
||||||
color = clamp(color, 0.0, 1.0);
|
|
||||||
texel = texture2D(texture, gl_TexCoord[0].st);
|
|
||||||
fragColor = color * texel + specular;
|
|
||||||
//fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
|
|
||||||
//gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
|
|
||||||
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
|
||||||
gl_FragColor = fragColor;
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
// Shader that uses OpenGL state values to do per-pixel lighting
|
|
||||||
//
|
|
||||||
// The only light used is gl_LightSource[0], which is assumed to be
|
|
||||||
// directional.
|
|
||||||
//
|
|
||||||
// Diffuse colors come from the gl_Color, ambient from the material. This is
|
|
||||||
// equivalent to osg::Material::DIFFUSE.
|
|
||||||
vec4 ambientColor();
|
|
||||||
vec4 diffuseColor();
|
|
||||||
vec4 specularColor();
|
|
||||||
vec4 emissionColor();
|
|
||||||
|
|
||||||
varying vec4 diffuse, constantColor, matSpecular;
|
|
||||||
varying vec3 normal;
|
|
||||||
//varying float alpha, fogCoord;
|
|
||||||
varying float alpha;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
//vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
||||||
//vec3 ecPosition3 = vec3(gl_ModelViewMatrix * gl_Vertex) / ecPosition.w;
|
|
||||||
gl_Position = ftransform();
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
normal = gl_NormalMatrix * gl_Normal;
|
|
||||||
diffuse = diffuseColor() * gl_LightSource[0].diffuse;
|
|
||||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
|
||||||
// transparency animation is at work
|
|
||||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
|
||||||
alpha = gl_FrontMaterial.diffuse.a;
|
|
||||||
else
|
|
||||||
alpha = diffuse.a;
|
|
||||||
constantColor = emissionColor()
|
|
||||||
+ ambientColor() * (gl_LightModel.ambient + gl_LightSource[0].ambient);
|
|
||||||
//fogCoord = abs(ecPosition3.z);
|
|
||||||
matSpecular = specularColor();
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
vec4 ambientColor()
|
|
||||||
{
|
|
||||||
return gl_FrontMaterial.ambient;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 diffuseColor()
|
|
||||||
{
|
|
||||||
return gl_Color;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 specularColor()
|
|
||||||
{
|
|
||||||
return gl_FrontMaterial.specular;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 emissionColor()
|
|
||||||
{
|
|
||||||
return gl_FrontMaterial.emission;
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
vec4 ambientColor()
|
|
||||||
{
|
|
||||||
return gl_FrontMaterial.ambient;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 diffuseColor()
|
|
||||||
{
|
|
||||||
return gl_FrontMaterial.diffuse;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 specularColor()
|
|
||||||
{
|
|
||||||
return gl_FrontMaterial.specular;
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 emissionColor()
|
|
||||||
{
|
|
||||||
return gl_FrontMaterial.emission;
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
// Ambient term comes in gl_Color.rgb.
|
|
||||||
varying vec4 diffuse_term;
|
|
||||||
varying vec3 normal;
|
|
||||||
//varying float fogCoord;
|
|
||||||
|
|
||||||
uniform sampler2D texture;
|
|
||||||
|
|
||||||
////fog "include" /////
|
|
||||||
uniform int fogType;
|
|
||||||
|
|
||||||
vec3 fog_Func(vec3 color, int type);
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
float luminance(vec3 color)
|
|
||||||
{
|
|
||||||
return dot(vec3(0.212671, 0.715160, 0.072169), color);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
vec3 n, halfV;
|
|
||||||
float NdotL, NdotHV, fogFactor;
|
|
||||||
vec4 color = gl_FrontLightModelProduct.sceneColor + gl_Color;
|
|
||||||
vec3 lightDir = gl_LightSource[0].position.xyz;
|
|
||||||
vec3 halfVector = gl_LightSource[0].halfVector.xyz;
|
|
||||||
vec4 texel;
|
|
||||||
vec4 fragColor;
|
|
||||||
vec4 specular = vec4(0.0);
|
|
||||||
// If gl_Color.a == 0, this is a back-facing polygon and the
|
|
||||||
// normal should be reversed.
|
|
||||||
n = (2.0 * gl_Color.a - 1.0) * normal;
|
|
||||||
n = normalize(n);
|
|
||||||
NdotL = dot(n, lightDir);
|
|
||||||
if (NdotL > 0.0) {
|
|
||||||
color += diffuse_term * NdotL;
|
|
||||||
halfV = normalize(halfVector);
|
|
||||||
NdotHV = max(dot(n, halfV), 0.0);
|
|
||||||
if (gl_FrontMaterial.shininess > 0.0)
|
|
||||||
specular.rgb = (gl_FrontMaterial.specular.rgb
|
|
||||||
* gl_LightSource[0].specular.rgb
|
|
||||||
* pow(NdotHV, gl_FrontMaterial.shininess));
|
|
||||||
}
|
|
||||||
color.a = diffuse_term.a;
|
|
||||||
// This shouldn't be necessary, but our lighting becomes very
|
|
||||||
// saturated. Clamping the color before modulating by the texture
|
|
||||||
// is closer to what the OpenGL fixed function pipeline does.
|
|
||||||
color = clamp(color, 0.0, 1.0);
|
|
||||||
texel = texture2D(texture, gl_TexCoord[0].st);
|
|
||||||
fragColor = color * texel + specular;
|
|
||||||
//fogFactor = exp(-gl_Fog.density * gl_Fog.density * fogCoord * fogCoord);
|
|
||||||
//gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
|
|
||||||
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
|
||||||
gl_FragColor = fragColor;
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
// -*-C++-*-
|
|
||||||
|
|
||||||
// Shader that uses OpenGL state values to do per-pixel lighting
|
|
||||||
//
|
|
||||||
// The only light used is gl_LightSource[0], which is assumed to be
|
|
||||||
// directional.
|
|
||||||
//
|
|
||||||
// Diffuse colors come from the gl_Color, ambient from the material. This is
|
|
||||||
// equivalent to osg::Material::DIFFUSE.
|
|
||||||
#version 120
|
|
||||||
|
|
||||||
#define MODE_OFF 0
|
|
||||||
#define MODE_DIFFUSE 1
|
|
||||||
#define MODE_AMBIENT_AND_DIFFUSE 2
|
|
||||||
|
|
||||||
// The ambient term of the lighting equation that doesn't depend on
|
|
||||||
// the surface normal is passed in gl_{Front,Back}Color. The alpha
|
|
||||||
// component is set to 1 for front, 0 for back in order to work around
|
|
||||||
// bugs with gl_FrontFacing in the fragment shader.
|
|
||||||
varying vec4 diffuse_term;
|
|
||||||
varying vec3 normal;
|
|
||||||
//varying float fogCoord;
|
|
||||||
|
|
||||||
uniform int colorMode;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
//vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
|
||||||
gl_Position = ftransform();
|
|
||||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
||||||
normal = gl_NormalMatrix * gl_Normal;
|
|
||||||
vec4 ambient_color, diffuse_color;
|
|
||||||
if (colorMode == MODE_DIFFUSE) {
|
|
||||||
diffuse_color = gl_Color;
|
|
||||||
ambient_color = gl_FrontMaterial.ambient;
|
|
||||||
} else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
|
|
||||||
diffuse_color = gl_Color;
|
|
||||||
ambient_color = gl_Color;
|
|
||||||
} else {
|
|
||||||
diffuse_color = gl_FrontMaterial.diffuse;
|
|
||||||
ambient_color = gl_FrontMaterial.ambient;
|
|
||||||
}
|
|
||||||
diffuse_term = diffuse_color * gl_LightSource[0].diffuse;
|
|
||||||
vec4 ambient_term = ambient_color * gl_LightSource[0].ambient;
|
|
||||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
|
||||||
// transparency animation is at work
|
|
||||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
|
||||||
diffuse_term.a = gl_FrontMaterial.diffuse.a;
|
|
||||||
else
|
|
||||||
diffuse_term.a = gl_Color.a;
|
|
||||||
// Another hack for supporting two-sided lighting without using
|
|
||||||
// gl_FrontFacing in the fragment shader.
|
|
||||||
gl_FrontColor.rgb = ambient_term.rgb; gl_FrontColor.a = 1.0;
|
|
||||||
gl_BackColor.rgb = ambient_term.rgb; gl_FrontColor.a = 0.0;
|
|
||||||
//fogCoord = abs(ecPosition.z / ecPosition.w);
|
|
||||||
}
|
|