Howto:Aircraft reflection shader: Difference between revisions

Jump to navigation Jump to search
m
typo; add syntaxhighlight
m (+-cat)
m (typo; add syntaxhighlight)
Line 3: Line 3:


{{caution|
{{caution|
The [[model-combined effect]] shader have '''replaced''' the separate reflection shaders.
The [[model-combined effect]] shader has '''replaced''' the separate reflection shaders.


The separate reflection shaders should be considered '''deprecated''' and '''should not be used for new development'''.}}
The separate reflection shaders should be considered '''deprecated''' and '''should not be used for new development'''.}}
Line 44: Line 44:


Inside the <tt>AircraftName.xml</tt>, we need to put the following lines of code, shortly after or before other <animation> tag entries:
Inside the <tt>AircraftName.xml</tt>, we need to put the following lines of code, shortly after or before other <animation> tag entries:
 
<syntaxhighlight lang="xml">
  <nowiki><!-- REFLECTION --></nowiki>
  <nowiki><!-- REFLECTION --></nowiki>
     <effect>
     <effect>
Line 64: Line 64:
         <object-name>RHelevator</object-name>
         <object-name>RHelevator</object-name>
     </effect>
     </effect>
 
</syntaxhighlight>
Note that for each <object-name> tag, you need to indicate the aircraft's objects. If you are not the original aircraft author and do not know which parts to enter, or how they are named, use the other animations tags object names which indicate the pieces you require to be reflected (such as <object-name>fuselage</object-name> is an obvious one). Obviously do not enter things which you don't want to be reflected!
Note that for each <object-name> tag, you need to indicate the aircraft's objects. If you are not the original aircraft author and do not know which parts to enter, or how they are named, use the other animations tags object names which indicate the pieces you require to be reflected (such as <object-name>fuselage</object-name> is an obvious one). Obviously do not enter things which you don't want to be reflected!


Line 75: Line 75:


You'll still need to use the code above in your file but this time, you'll use your own effect shader (below). The difference is you'll replace:
You'll still need to use the code above in your file but this time, you'll use your own effect shader (below). The difference is you'll replace:
<inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
<syntaxhighlight lang="xml">
<inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
</syntaxhighlight>
with
with
<inherits-from>Aircraft/YourAircraftName/Effects/foo_reflect</inherits-from>
<syntaxhighlight lang="xml">
<inherits-from>Aircraft/YourAircraftName/Effects/foo_reflect</inherits-from>
</syntaxhighlight>
Now we'll create this foo_reflect file.
Now we'll create this foo_reflect file.


Create a Folder inside your Models-folder called "Effects".
Create a Folder inside your Models-folder called "Effects".
Now you create a new .eff file named: foo_reflect.eff and save it to the "Effects" folder:
Now you create a new .eff file named: foo_reflect.eff and save it to the "Effects" folder:
 
<syntaxhighlight lang="xml">
<nowiki><!--foo_reflect.eff--></nowiki>
<!--foo_reflect.eff-->
<PropertyList>
<PropertyList>
   <name>Effects/foo_reflect</name>
   <name>Effects/foo_reflect</name>
   <inherits-from>Effects/reflect</inherits-from>
   <inherits-from>Effects/reflect</inherits-from>
Line 133: Line 137:
   </parameters>
   </parameters>
  </PropertyList>
  </PropertyList>
 
</syntaxhighlight>
'''Explanation:'''  
'''Explanation:'''  


Navigation menu