Ignore:
Timestamp:
11/29/08 18:24:53 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3168 r3195  
    125125        float3x3 tangToWorldTrafo = transpose(float3x3(tangent, bitangent, normal)); 
    126126         
    127         const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz * 2.0f - float3(1.0f); 
     127        //const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz * 2.0f - float3(1.0f); 
     128        const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz; 
     129        pix.normal = mul(tangToWorldTrafo, tangentSpaceNorm); 
     130        //pix.normal = tangentSpaceNorm; 
    128131         
    129         pix.normal = normalize(mul(tangToWorldTrafo, tangentSpaceNorm)); 
    130                  
    131132        return pix; 
    132133} 
     
    171172        float3x3 tangToWorldTrafo = transpose(float3x3(IN.tangent.xyz, IN.bitangent.xyz, IN.normal.xyz)); 
    172173        const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz; 
    173         pix.normal = mul(tangToWorldTrafo, tangentSpaceNorm); 
     174        //pix.normal = mul(tangToWorldTrafo, tangentSpaceNorm); 
     175        pix.normal = tangentSpaceNorm; 
    174176 
    175177        return pix; 
Note: See TracChangeset for help on using the changeset viewer.