Ignore:
Timestamp:
11/11/08 00:46:01 (16 years ago)
Author:
mattausch
Message:

tree animation works somehow with flow vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/treeanimation.cg

    r3115 r3116  
    8585                 
    8686        const float pos = (minMaxPos.x - IN.position.z) / (minMaxPos.x - minMaxPos.y); 
     87 
    8788        float factor = pos * pos * windStrength * sin(timer * frequency); 
     89        const float4 offs = float4(factor * windDir, 0); 
    8890 
    89         const float4 offs = float4(factor * windDir, 0); 
     91        float oldFactor = pos * pos * windStrength * sin(oldTimer * frequency); 
     92        const float4 oldOffs = float4(oldFactor * windDir, 0); 
    9093 
    9194        // transform the vertex position into post projection space 
     
    101104         
    102105        // hack: no translational component anyway 
    103         OUT.oldWorldPos = float4(.0f); 
     106        OUT.oldWorldPos = oldOffs; 
    104107        OUT.worldPos = offs; 
    105108 
Note: See TracChangeset for help on using the changeset viewer.