Editing Darkplaces material system/Stages

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 94: Line 94:
 
:Stretches the texture coordinates with the given function. Stretching is defined as stretching the texture coordinate away from the center of the polygon and then compressing it towards the center of the polygon. (see Key Concepts for waveform parameter definitions).
 
:Stretches the texture coordinates with the given function. Stretching is defined as stretching the texture coordinate away from the center of the polygon and then compressing it towards the center of the polygon. (see Key Concepts for waveform parameter definitions).
 
:'''Example''':
 
:'''Example''':
  <font color=green>// stretch coordinates using sin wave with 1.5 seconds cycle time</font>
+
  tcMod stretch sin 1.2 0.8 0 1.5
<font color=blue>tcMod stretch</font> <font color=orange>sin</font> 1.2 0.8 0 1.5
+
  
 
=== tcMod transform &lt;m00&gt; &lt;m01&gt; &lt;m10&gt; &lt;m11&gt; &lt;t0&gt; &lt;t1&gt; ===
 
=== tcMod transform &lt;m00&gt; &lt;m01&gt; &lt;m10&gt; &lt;m11&gt; &lt;t0&gt; &lt;t1&gt; ===
Line 101: Line 100:
 
:S = s * m00 + t * m10 + t0
 
:S = s * m00 + t * m10 + t0
 
:T = s * m01 + t * m11 + t1
 
:T = s * m01 + t * m11 + t1
:This is for use by programmers. S stands for side coordinate (width), T stands for top (height).
+
:This is for use by programmers.
'''Example''':
+
<span style="color:green">// Transform that does nothing</span>
+
<span style="color:blue">tcMod</span> transform 1 0 0 1 0 1
+
<span style="color:green">// Shift texture up by 1/128 of it's height</span>
+
<span style="color:blue">tcMod</span> transform 1 0 0 1 0 0.0078125
+
  
 
=== tcMod turb &lt;base&gt; &lt;amplitude&gt; &lt;phase&gt; &lt;freq&gt; ===
 
=== tcMod turb &lt;base&gt; &lt;amplitude&gt; &lt;phase&gt; &lt;freq&gt; ===

Please note that all contributions to Blood Wiki are considered to be released under the Creative Commons Attribution Share Alike (see BloodWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)

This page is a member of 1 hidden category:

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox