Board index FlightGear Development Effects and shaders

How do you install Shaders?

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

How do you install Shaders?

Postby null » Sun Jan 08, 2017 9:33 am

This may be obvious but all i see when i go to shader pages are codes like this

Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
    <name>skin_reflect</name>
    <inherits-from>Effects/model-combined-deferred</inherits-from>
    <parameters>
        <normalmap-enabled type="int">0</normalmap-enabled>
        <reflection-enabled type="int">1</reflection-enabled>
        <reflection-dynamic type="int">1</reflection-dynamic>
        <reflect-map-enabled type="int">0 </reflect-map-enabled>
        <reflection-correction type="float">0</reflection-correction>
        <texture n="4">
         <image>Flugzeuge/CSeries/Models/Effects/greymap.png</image>
         <type>2d</type>
         <filter>linear-mipmap-linear</filter>
         <wrap-s>clamp</wrap-s>
         <wrap-t>clamp</wrap-t>
         <internal-format>normalized</internal-format>
      </texture>
        <texture n="5">
            <type>cubemap</type>
            <images>
                <positive-x>Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_px.png</positive-x>
                <negative-x>Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_nx.png</negative-x>
                <positive-y>Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_py.png</positive-y>
                <negative-y>Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_ny.png</negative-y>
                <positive-z>Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_pz.png</positive-z>
                <negative-z>Aircraft/Generic/Effects/CubeMaps/real.fair-sky/fair-sky_nz.png</negative-z>
            </images>
        </texture>
                <reflection-rainbow type="float">0.1</reflection-rainbow>
                <reflection-fresnel type="float">-1</reflection-fresnel>
        <ambient-correction>0.5</ambient-correction>
    </parameters>
</PropertyList>


How do i install these codes or install the mod somehow?
Last edited by Johan G on Mon Jan 09, 2017 1:14 pm, edited 1 time in total.
Reason: Adding [code] tags. Can be done manually or by using the [>_ ] button above the text edit box.
null
 
Posts: 1
Joined: Sun Jan 08, 2017 9:32 am

Re: How do you install Shaders?

Postby Necolatis » Sun Jan 08, 2017 9:37 am

"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1819
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.1.1
OS: Windows 10 Pro

Re: How do you install Shaders?

Postby Thorsten » Sun Jan 08, 2017 10:23 am

The question is a bit ambiguous...

* If you are an end user, you don't need to do anything, Effects and Shaders come with the FG installation/the airplane.

* If you are an aircraft developer/maintainer, you need to add xml-files to your aircraft declaration, specifying which effect with which parameters should apply to which part. The link Necolatis has provided should help.

* Finally, if you want to code a certain shader effect, you need to have the GLSL files somewhere and then use the effect declaration to run them (this is explained in /Docs/README.effects (you need a fair amount of 3d rendering background knowledge to make any sense of this, but then again, you also need that to code your own shaders)
Thorsten
 
Posts: 9367
Joined: Mon Nov 02, 2009 8:33 am


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest