Ignore:
Timestamp:
07/07/08 10:52:03 (16 years ago)
Author:
mattausch
Message:

worked on deferred shading

File:
1 edited

Legend:

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

    r2813 r2818  
    4141 
    4242 
    43 vtxout vtx(vtxin IN, uniform float4x4 ModelViewProj) 
     43vtxout vtx(vtxin IN,  
     44           const uniform float4x4 ModelViewProj, 
     45           uniform float4x4 ModelMatrix) 
    4446{ 
    4547   vtxout OUT; 
    4648   
    4749   // transform the vertex position into eye space 
    48    OUT.position = mul(ModelViewProj, IN.position); 
    49  
    5050   OUT.color = IN.color; 
    5151 
    5252   OUT.texCoord = IN.texCoord; 
     53   OUT.worldPos = mul(ModelMatrix, IN.position); 
     54 
     55   // transform the vertex position into eye space 
     56   OUT.position = mul(ModelViewProj, OUT.worldPos); 
     57 
    5358   OUT.worldPos = IN.position; 
    54    // eye pos with linear depth 
    55    //OUT.worldPos = OUT.position; 
     59 
    5660   OUT.normal = IN.normal; 
    5761 
     
    6670  pix.col = tex2D(tex, IN.texCoord.xy); 
    6771  pix.pos = IN.worldPos * maxDepth; 
     72  pix.norm = IN.normal; 
    6873  pix.pos.w = IN.projPos.w; 
    69   pix.norm = IN.normal; 
    7074 
    7175  return pix; 
Note: See TracChangeset for help on using the changeset viewer.