- Timestamp:
- 11/25/08 18:58:47 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3167 r3168 519 519 520 520 // antialiasing of the color buffer 521 AntiAliasing(fbo, light);521 //AntiAliasing(fbo, light); 522 522 523 523 switch (mShadingMethod) … … 546 546 // as multisampling is difficult / costly with deferred shading, 547 547 // at least do some antialiasing 548 AntiAliasing(fbo, light);548 //AntiAliasing(fbo, light); 549 549 550 550 // just output the latest buffer 551 //Output(fbo);551 Output(fbo); 552 552 553 553 glEnable(GL_LIGHTING); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg
r3167 r3168 80 80 // weight: 0 = no antialiasing, 1 = full antialiasing 81 81 const float w = (1.0f - de * ne) * kernel.x; 82 83 82 // smoothed color: the offset is big where discontinuities are 84 83 // (a - c) * w + c = a * w + c * (1 - w) … … 96 95 //float4 col = float4(de.x, de.x, de.x, 0); 97 96 //float4 col = float4(w, w, w, 0); 98 //float4 col = float4(centerNormal * 0.5f + float3(0.5f), 0); 99 //col = step(.0f, col); 100 //float4 col = float4(centerNormal, 0); 101 97 102 98 // push through the current depth 103 99 col.w = centerDepth.x; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3167 r3168 180 180 //if (col.w < 1e10f) 181 181 { 182 const float eyeSpaceDepth = col.w; 183 const float distanceScaleWeight = 2.0f; 182 //const float eyeSpaceDepth = col.w; const float distanceScaleWeight = 2.0f; 184 183 //const float distanceScale = distanceScaleWeight / (eyeSpaceDepth + distanceScaleWeight); 185 184 const float distanceScale = 1.0f; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3167 r3168 156 156 pixel OUT; 157 157 158 float4 norm = tex2D(normals, IN.texCoord.xy); 159 const float3 normal = normalize(norm.xyz); 158 const float3 normal = tex2D(normals, IN.texCoord.xy); 160 159 161 160 float4 color = tex2Dlod(colors, float4(IN.texCoord, 0, 0)); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
r3104 r3168 166 166 pixel2 OUT; 167 167 168 float4 norm = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)); 169 float3 normal = normalize(norm.xyz); 168 const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)); 170 169 171 170 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r3136 r3168 94 94 // multiply with the inverse transpose of T, we multiple with 95 95 // Transp(Inv(Inv(view))) = Transp(view) 96 pix.norm = mul(transpose(viewMatrix), IN.normal).xyz;96 pix.norm = normalize(mul(transpose(viewMatrix), IN.normal).xyz); 97 97 //pix.norm = IN.normal.xyz; 98 98 // compute eye linear depth … … 116 116 // multiplying with inverse view. since transforming normal with T means to 117 117 // multiply with the inverse transpose of T, we multiple with Transp(Inv(Inv(view))) = Transp(view) 118 pix.norm = mul(transpose(viewMatrix), IN.normal).xyz;118 pix.norm = normalize(mul(transpose(viewMatrix), IN.normal).xyz); 119 119 //pix.norm = IN.normal.xyz; 120 120 // eye space depth -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg
r3163 r3168 124 124 // as it is the inverse of a rotation matrix 125 125 float3x3 tangToWorldTrafo = transpose(float3x3(tangent, bitangent, normal)); 126 //float3x3 tangToWorldTrafo = transpose(float3x3(bitangent, tangent, normal)); 127 //float3x3 tangToWorldTrafo = transpose(float3x3(tangent, normal, bitangent)); 128 //float3x3 tangToWorldTrafo = transpose(float3x3(normal, bitangent, tangent)); 129 //float3x3 tangToWorldTrafo = transpose(float3x3(normal, tangent, bitangent)); 130 126 131 127 const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz * 2.0f - float3(1.0f); 132 //const float3 tangentSpaceNorm = float3(0, 1, 0);133 //const float3 tangentSpaceNorm = float3(0, 0, 1);134 128 135 129 pix.normal = normalize(mul(tangToWorldTrafo, tangentSpaceNorm)); 136 //pix.normal = normalize(tangentSpaceNorm); 137 //pix.color.xyz = float3(abs(dot(tangent.xyz, normal.xyz))); 138 //pix.color.xyz = float3(abs(dot(bitangent.xyz, tangent.xyz))); 139 //pix.color.xyz = float3(abs(dot(normalize(IN.normal.xyz), normalize(IN.tangent.xyz)))); 140 //pix.color.xyz = float3(abs(dot(IN.normal.xyz, IN.tangent.xyz))); 141 //pix.color.xyz = normal.xyz; 142 //pix.color.xyz = IN.tangent.xyz; 143 //pix.color.xyz = float3(IN.texCoord.x,0,0); 144 //pix.color.xyz = float3(0,IN.texCoord.y,0); 145 130 146 131 return pix; 147 132 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao3d.cg
r3167 r3168 124 124 pixel OUT; 125 125 126 float4 norm = tex2D(normals, IN.texCoord.xy); 127 128 // the ambient term 129 //const float amb = norm.w; 130 // expand normal 131 float3 normal = normalize(norm.xyz); 126 const float3 normal = tex2D(normals, IN.texCoord.xy); 132 127 /// the current view direction 133 float3 viewDir;// = normalize(IN.view); 134 128 float3 viewDir = normalize(IN.view); 135 129 // the current world position 136 130 const float4 centerPosition = tex2D(positions, IN.texCoord.xy); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/treeanimation.cg
r3155 r3168 99 99 OUT.eyePos += offs; 100 100 101 OUT.normal = mul(glstate.matrix.invtrans.modelview[0], IN.normal);101 OUT.normal = normalize(mul(glstate.matrix.invtrans.modelview[0], IN.normal)); 102 102 103 103 // hack: no translational component anyway
Note: See TracChangeset
for help on using the changeset viewer.