On 15.11.2006 19:56, Piotr Obrzut wrote:
> Hi res,
> 
>>>   Base shader have 'copy' mixmode  and second have 'add'. When I set the
>>>   output color of first shader with black color, I was expecting that
>>>   this sentence (SplatSampler is "splat alpha map"):
>>>
>>>   float4 splat = tex2D(SplatSampler, In.vBaseTexCoords);
>>>   float4 OutputColor = splat;
>>>   return OutputColor;
> 
>> Think about what the base map is: a single map used for the terrain
>> surface beyond the splatting distance. Hence a splat map does not make
>> sense for the base map: it doesn't have one.
> 
> This probably was valid for old terrain system. 

Well, the "old" system is the "stable" one right now, so you could've
expected an answer in this context by default :P

> In new terrain, 'base
> material' default shader uses splat map (and it is one of the visible
> materials from close distance). In terraindemo from new terrain branch
> the base material is lava (you can see it on top of volcano), check
> this screenshot:
> http://img143.imageshack.us/img143/1504/terrainsplat5pk.jpg
> 
> the base shader:
>   <technique priority="100">
>     <tag>terrain_splatting</tag>
> 
>     <pass>
>       <mixmode>
>         <copy />
>       </mixmode>
> 
>       <buffer source="texture coordinate 0" destination="texture coordinate 
> 0" />
>       <vp plugin="glcg" file="/data/terraini/geomorph.cgvp" />
>       <texture destination="unit 0" name="tex diffuse" />
>       <texture destination="unit 1" name="splat alpha map" />
>       <fp plugin="glfixed">
>         <fixedfp>
>           <layer>
>             <colorsource num="0" source="primary color" modifier="color" />
>             <colorsource num="1" source="texture" modifier="color" />
>             <coloroperation operation="modulate" />
>           </layer>
>           <layer>
>             <colorsource num="0" source="previous layer" modifier="color" />
>             <colorsource num="1" source="texture" modifier="color" />
>             <coloroperation operation="modulate" />
>             <alphasource num="0" source="texture" modifier="color" />
>             <alphaoperation operation="replace" />
>           </layer>
>         </fixedfp>
>       </fp>
>     </pass>
>   </technique>
> 
>   unlike to old system I don't see any reference to LOD.
> 
> 
> 
>   Could someone explain me how it should work?

Well, "lava" is the first material of the material palette - which is
not the same as the base map. (Using a splatting shader for the base
material woudl also go a bit against the idea of a base material.)

How to define the "real" basemap I don't know - either it was scrapped
from the improved terrain for some reason (which I'm curious about,
since I would expect poorer performance with an all-splat terrain) or
it's specified with some mechanism I fail to see right now.

-f.r.


Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to