.kju 3245 Posted January 1, 2008 http://community.bistudio.com/wiki/ArmA:_RVMAT Quote[/b] ] Shader specific settingSelecting 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 = "ca\sara\data\layers\s_023_028_lco.paa"; texGen = 3; }; 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 = "ca\sara\data\layers\m_023_028_lco.paa"; texGen = 4; }; 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 = "worldPos"; class uvTransform { aside[] = {0.001953, 0.0, 0.0}; up[] = {0.0, 0.0, 0.001953}; dir[] = {0.0, -0.001953, 0.0}; pos[] = {-21.5313, 13.7813, 0.0}; }; }; class TexGen4 { uvSource = "worldPos"; class uvTransform { aside[] = {0.001953, 0.0, 0.0}; up[] = {0.0, 0.0, 0.001953}; dir[] = {0.0, -0.001953, 0.0}; pos[] = {-21.5313, 13.7813, 0.0}; }; }; --- 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 = "tex"; class uvTransform { aside[] = {1.0, 0.0, 0.0}; up[] = {0.0, 1.0, 0.0}; dir[] = {0.0, 0.0, 1.0}; pos[] = {0.0, 0.0, 0.0}; }; }; class TexGen1 { uvSource = "tex"; class uvTransform { aside[] = {10.0, 0.0, 0.0}; up[] = {0.0, 10.0, 0.0}; dir[] = {0.0, 0.0, 10.0}; pos[] = {0.0, 0.0, 0.0}; }; }; class TexGen2 { uvSource = "tex"; class uvTransform { aside[] = {10.0, 0.0, 0.0}; up[] = {0.0, 10.0, 0.0}; dir[] = {0.0, 0.0, 10.0}; pos[] = {0.0, 0.0, 0.0}; }; }; class Stage2 { texture = "ca\sara\data\travajih_mco.paa"; texGen = 0; }; class Stage3 { texture = "ca\sara\data\travajih_detail_nohq.paa"; texGen = 1; }; class Stage4 { texture = "ca\sara\data\travajih_detail_co.paa"; texGen = 2; }; class Stage5 { texture = "ca\sara\data\pisek_mco.paa"; texGen = 0; }; class Stage6 { texture = "ca\sara\data\pisek_detail_nohq.paa"; texGen = 1; }; class Stage7 { texture = "ca\sara\data\pisek_detail_co.paa"; texGen = 2; }; class Stage8 { texture = "ca\sara\data\pisekpoust_mco.paa"; texGen = 0; }; class Stage9 { texture = "ca\sara\data\pisekpoust_detail_nohq.paa"; texGen = 1; }; class Stage10 { texture = "ca\sara\data\pisekpoust_detail_co.paa"; texGen = 2; }; class Stage11 { texture = "ca\sara\data\skalaj_mco.paa"; texGen = 0; }; class Stage12 { texture = "ca\sara\data\skalaj_detail_nohq.paa"; texGen = 1; }; class Stage13 { texture = "ca\sara\data\skalaj_detail_co.paa"; texGen = 2; }; Cheers. PS: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> * uvSource="tex"; can be: none, tex, tex1 (second UV set) It seems "worldPos" is valid too in certain situations.. Share this post Link to post Share on other sites
Romolus 0 Posted January 1, 2008 answered in your other thread: Layers.cfg Share this post Link to post Share on other sites