- Timestamp:
- 11/29/08 18:24:53 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg
r3168 r3195 125 125 float3x3 tangToWorldTrafo = transpose(float3x3(tangent, bitangent, normal)); 126 126 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; 128 131 129 pix.normal = normalize(mul(tangToWorldTrafo, tangentSpaceNorm));130 131 132 return pix; 132 133 } … … 171 172 float3x3 tangToWorldTrafo = transpose(float3x3(IN.tangent.xyz, IN.bitangent.xyz, IN.normal.xyz)); 172 173 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; 174 176 175 177 return pix;
Note: See TracChangeset
for help on using the changeset viewer.