- Timestamp:
- 11/21/08 09:19:15 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg
r3146 r3152 160 160 // as it is the inverse of a rotation matrix 161 161 float3x3 tangToWorldTrafo = transpose(float3x3(IN.tangent.xyz, IN.bitangent.xyz, IN.normal.xyz)); 162 const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz; 162 const float3 tangentSpaceNorm = normalize(tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz); 163 //const float3 tangentSpaceNorm = tex2D(normalMap, IN.texCoord.xy).xyz; 164 163 165 pix.normal = mul(tangToWorldTrafo, tangentSpaceNorm); 164 pix.normal = tangentSpaceNorm; 166 //pix.color.xyz = tangentSpaceNorm; 167 165 168 return pix; 166 169 }
Note: See TracChangeset
for help on using the changeset viewer.