Ignore:
Timestamp:
11/30/08 20:41:23 (16 years ago)
Author:
mattausch
Message:

removed some visual bugs (trees against sky), flickering much better now

File:
1 edited

Legend:

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

    r3168 r3198  
    103103        // hack: no translational component anyway 
    104104        OUT.oldWorldPos = oldOffs; 
     105        //OUT.oldWorldPos = float4(1e20f, 1e20f, 1e20f, oldOffs.w); 
    105106        OUT.worldPos = offs; 
    106107 
    107108        return OUT; 
    108109} 
     110 
     111/* 
     112 
     113pixel fragtex(fragin IN,  
     114                          uniform sampler2D tex: TEXUNIT0, 
     115                          uniform float4x4 viewMatrix 
     116                          ) 
     117{ 
     118        float4 texColor = tex2D(tex, IN.texCoord.xy); 
     119 
     120        // account for alpha blending 
     121        if (texColor.w < 0.5f) discard; 
     122 
     123        pixel pix; 
     124 
     125        // save color in first render target 
     126        // hack: use combination of emmisive + diffuse (emmisive used as constant ambient term) 
     127        pix.col = (glstate.material.emission + glstate.material.diffuse) * texColor;  
     128        // save world space normal in rt => transform back into world space by 
     129        // multiplying with inverse view. since transforming normal with T means to  
     130        // multiply with the inverse transpose of T, we multiple with  
     131        // Transp(Inv(Inv(view))) = Transp(view) 
     132        pix.norm = normalize(mul(transpose(viewMatrix), IN.normal).xyz); 
     133        //pix.norm = IN.normal.xyz; 
     134        // compute eye linear depth 
     135        pix.col.w = 1e20f;//length(IN.eyePos.xyz); 
     136 
     137        // the scene entity id 
     138        //pix.id = glstate.fog.color.xyz; 
     139        // the offset to the world pos from old frame 
     140        pix.offsVec = IN.oldWorldPos.xyz - IN.worldPos.xyz; 
     141 
     142        return pix; 
     143}*/ 
Note: See TracChangeset for help on using the changeset viewer.