Ignore:
Timestamp:
10/19/08 00:29:45 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3034 r3041  
    88}; 
    99 
     10 
    1011// vtx output 
    1112struct vtxout 
    1213{ 
    13   float4 position: POSITION; // eye space 
    14   float4 texCoord: TEXCOORD0;     
     14        float4 position: POSITION; 
     15        float4 texCoord: TEXCOORD0;     
    1516 
    16   float4 color: COLOR0;   
    17   float4 eyePos: TEXCOORD1; // eye position 
    18   float3 normal: TEXCOORD2; 
     17        float4 color: COLOR0;   
     18        float4 eyePos: TEXCOORD1; // eye position 
     19        float3 normal: TEXCOORD2; 
    1920}; 
    2021 
     
    6061} 
    6162 
    62 //#pragma position_invariant fragtex 
    6363 
    6464pixel fragtex(fragin IN,  
     
    7878        // save world space normal in rt 
    7979        pix.norm = IN.normal; 
    80  
     80        // compute eye linear depth 
     81        pix.col.w = length(IN.eyePos.xyz); 
    8182        // hack: squeeze some information about ambient into the texture 
    8283        //pix.col.w = glstate.material.emission.x; 
    83  
    84         // compute eye linear depth 
    85         pix.col.w = length(IN.eyePos.xyz); 
    8684 
    8785        return pix; 
     
    9290{ 
    9391        pixel pix; 
    94  
    9592        // hack: use comination of emmisive + diffuse (emmisive used as constant ambient term) 
    9693        pix.col = glstate.material.diffuse + glstate.material.emission; 
    97  
     94        // save world space normal in rt 
    9895        pix.norm = IN.normal; 
    99  
     96        // eye space depth 
    10097        pix.col.w = length(IN.eyePos.xyz); 
    101  
    10298        // hack: squeeze some information about the ambient term into the target 
    10399        //pix.col.w = glstate.material.emission.x; 
Note: See TracChangeset for help on using the changeset viewer.