Results 1 to 5 of 5

Thread: How to use 'Alphatest32' in rvmat

  1. #1
    Gunnery Sergeant
    Join Date
    Oct 9 2008
    Location
    Melbourne, Australia
    Posts
    433
    Does the alphatest32 renderflag only work with basic materials like for e.g. bodlak? im using a normalSpecularThroughNoFade for the vertex shader but I want to get rid of the pixelated edges.
    normalSpecularThrough seems to be a little bit alpha tested anyway, but I dont want to fade my alpha's out, so im using a _NO instead of a _NON.

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define _ARMA_


    //Class VeregIvy_list.rvmat{
    ambient&#91;&#93; = {0.4,0.4,0.4,1};
    diffuse&#91;&#93; = {0.4,0.4,0.4,1};
    forcedDiffuse&#91;&#93; = {0.1,0.1,0.1,0.5};
    emmisive&#91;&#93; = {0,0,0,1};
    specular&#91;&#93; = {0.04,0.04,0.04,1};
    specularPower = 64;
    PixelShaderID = &#34;NormalMapSpecularThrough&#34;;
    VertexShaderID = &#34;NormalMapSpecularThroughNoFade&#34;;
    renderFlags&#91;&#93; = {&#34;AlphaTest32&#34;};
    class Stage1
    {
    texture = &#34;ca&#92;VeregIvy&#92;data&#92;VeregIvy_list_no .paa&#34;;
    uvSource = &#34;tex&#34;;
    class uvTransform
    {
    ***aside&#91;&#93; = {1,0,0};
    ***up&#91;&#93; = {0,1,0};
    ***dir&#91;&#93; = {0,0,0};
    ***pos&#91;&#93; = {0,0,0};
    };
    };
    class Stage2
    {
    texture = &#34;#&#40;ai,32,32,1&#41;treeCrown&#40;0.1&#41;&# 34;;
    uvSource = &#34;none&#34;;
    };
    class Stage3
    {
    texture = &#34;#&#40;ai,32,32,1&#41;treeCrownAmb&#40;0.1&#41 ;&#34;;
    uvSource = &#34;none&#34;;
    };
    //};[/QUOTE]

  2. #2
    to take rid of the pixelated edges, you have to use both AlphaInstancing and alphatest64 renderflags.

    Also, for the VS you have to use either NormalMapSpecularThroughNoFade or NormalMapSpecularThrough

    It&#39;s not important if you use the _NO instead of the _NON because that is not a problem.

    I use this RVMAT for my Vegetation in my HDT island:
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ambient&#91;&#93; = {0.4,0.4,0.4,1};
    diffuse&#91;&#93; = {0.4,0.4,0.4,1};
    forcedDiffuse&#91;&#93; = {0,0,0,1};
    emmisive&#91;&#93; = {0,0,0,1};
    specular&#91;&#93; = {0,0,0,1};
    specularPower = 1;
    PixelShaderID = &#34;Grass&#34;;
    VertexShaderID = &#34;Basic&#34;;
    mainLight = &#34;Sun&#34;;
    renderFlags&#91;&#93; = {&#34;AlphaInstancing&#34;,&#34;AlphaTest64&#34; };
    fogMode = &#34;Fog&#34;;[/QUOTE]

  3. #3
    hey Linker Split

    could this be used for the standard ArmA vegetation as well?
    does it any good for it?

  4. #4
    yes, it can be used for standard Vegetation texture of course, and you will have better performance and FPS due to the fact that this RVMAT doesn&#39;t use any type of shader, so basically the engine will not run any NM ans SM

  5. #5
    Gunnery Sergeant
    Join Date
    Oct 9 2008
    Location
    Melbourne, Australia
    Posts
    433
    Author of the Thread
    Thanks for that Linker split, yeah thats the pretty much the material I got the renderflags from, I just didnt think alphaInstancing had anything to do with it, should of tried that though, cheers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •