http://community.bistudio.com/wiki/ArmA:_RVMAT

Quote Originally Posted by [b
Quote[/b] ] Shader specific setting

Selecting shader.

PixelShaderID=".....";
VertexShaderID=".....";

Each shader uses specific "Stages"

class StageX

Each stage defines parameters for shader calculation, usually as links to effect bitmaps.

* texture= (name and path to effect bitmap texture)

* Filter="Anisotropic";

Default is Anisotropic, but in some situations you can use Point, Linear, Trilinear.

* uvSource="tex";

can be: none, tex, tex1 (second UV set)

* class uvTransform

Offset, deformation or repeating of texture in given UV set.
I love the BIKI in times like these.
Okay so what should this tell me???

---

Lets start more simple:

Source file : p_023-028_l01_l02_l03_l06.rvmat
Source location: sara\Data\Layers

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Stage0 {
texture = &#34;ca&#92;sara&#92;data&#92;layers&#92;s_023_028 _lco.paa&#34;;
texGen = 3;
};[/QUOTE]

Assigns the sat textures ... okay, got that.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Stage1 {
texture = &#34;ca&#92;sara&#92;data&#92;layers&#92;m_023_028 _lco.paa&#34;;
texGen = 4;
};[/QUOTE]

Assigns the layer map masks ... okay, got that.

Position (pos) is defined in texGen3 and 4:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class TexGen3 {
uvSource = &#34;worldPos&#34;;

class uvTransform {
aside&#91;&#93; = {0.001953, 0.0, 0.0};
up&#91;&#93; = {0.0, 0.0, 0.001953};
dir&#91;&#93; = {0.0, -0.001953, 0.0};
pos&#91;&#93; = {-21.5313, 13.7813, 0.0};
};
};

class TexGen4 {
uvSource = &#34;worldPos&#34;;

class uvTransform {
aside&#91;&#93; = {0.001953, 0.0, 0.0};
up&#91;&#93; = {0.0, 0.0, 0.001953};
dir&#91;&#93; = {0.0, -0.001953, 0.0};
pos&#91;&#93; = {-21.5313, 13.7813, 0.0};
};
};[/QUOTE]

---

Now what about that stuff???

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class TexGen0 {
uvSource = &#34;tex&#34;;

class uvTransform {
aside&#91;&#93; = {1.0, 0.0, 0.0};
up&#91;&#93; = {0.0, 1.0, 0.0};
dir&#91;&#93; = {0.0, 0.0, 1.0};
pos&#91;&#93; = {0.0, 0.0, 0.0};
};
};

class TexGen1 {
uvSource = &#34;tex&#34;;

class uvTransform {
aside&#91;&#93; = {10.0, 0.0, 0.0};
up&#91;&#93; = {0.0, 10.0, 0.0};
dir&#91;&#93; = {0.0, 0.0, 10.0};
pos&#91;&#93; = {0.0, 0.0, 0.0};
};
};

class TexGen2 {
uvSource = &#34;tex&#34;;

class uvTransform {
aside&#91;&#93; = {10.0, 0.0, 0.0};
up&#91;&#93; = {0.0, 10.0, 0.0};
dir&#91;&#93; = {0.0, 0.0, 10.0};
pos&#91;&#93; = {0.0, 0.0, 0.0};
};
};

class Stage2 {
texture = &#34;ca&#92;sara&#92;data&#92;travajih_mco.paa&#34 ;;
texGen = 0;
};

class Stage3 {
texture = &#34;ca&#92;sara&#92;data&#92;travajih_detail_nohq .paa&#34;;
texGen = 1;
};

class Stage4 {
texture = &#34;ca&#92;sara&#92;data&#92;travajih_detail_co.p aa&#34;;
texGen = 2;
};

class Stage5 {
texture = &#34;ca&#92;sara&#92;data&#92;pisek_mco.paa&#34 ;;
texGen = 0;
};

class Stage6 {
texture = &#34;ca&#92;sara&#92;data&#92;pisek_detail_nohq.pa a&#34;;
texGen = 1;
};

class Stage7 {
texture = &#34;ca&#92;sara&#92;data&#92;pisek_detail_co.paa& #34;;
texGen = 2;
};

class Stage8 {
texture = &#34;ca&#92;sara&#92;data&#92;pisekpoust_mco.paa&# 34;;
texGen = 0;
};

class Stage9 {
texture = &#34;ca&#92;sara&#92;data&#92;pisekpoust_detail_no hq.paa&#34;;
texGen = 1;
};

class Stage10 {
texture = &#34;ca&#92;sara&#92;data&#92;pisekpoust_detail_co .paa&#34;;
texGen = 2;
};

class Stage11 {
texture = &#34;ca&#92;sara&#92;data&#92;skalaj_mco.paa&#3 4;;
texGen = 0;
};

class Stage12 {
texture = &#34;ca&#92;sara&#92;data&#92;skalaj_detail_nohq.p aa&#34;;
texGen = 1;
};

class Stage13 {
texture = &#34;ca&#92;sara&#92;data&#92;skalaj_detail_co.paa &#34;;
texGen = 2;
};
[/QUOTE]

Cheers.


PS:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> * uvSource=&#34;tex&#34;;

can be&#58; none, tex, tex1 &#40;second UV set&#41;[/QUOTE]

It seems "worldPos" is valid too in certain situations..