Changeset 2814 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 07/04/08 01:32:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2813 r2814 44 44 45 45 46 float2 reflect(float2 pt, float2 n) 47 { 48 // distance to plane 49 float d = dot(n, pt); 50 // reflect around plane 51 float2 rpt = pt - d * 2.0f * n; 52 53 //return pt; 54 return rpt; 55 } 56 57 46 58 //based on kustls shader 47 59 float ssao(fragment IN, … … 77 89 float3 noise = tex2D(noiseTexture, IN.texCoord.xy).xyz * 2.0f - 1.0f; 78 90 79 float2 offsetTransformed = offset;80 //float2 offsetTransformed;81 //offsetTransformed.x = noise.r*offset.x - noise.g*offset.y;82 //offsetTransformed.y = noise.g*offset.x + noise.r*offset.y;91 //float2 offsetTransformed = offset;//reflect(offset, noise.xy); 92 float2 offsetTransformed; 93 offsetTransformed.x = noise.r * offset.x - noise.g * offset.y; 94 offsetTransformed.y = noise.g * offset.x + noise.r * offset.y; 83 95 84 96 // weight with projected coordinate to reach similar kernel size for near and far … … 96 108 97 109 // distance between current position and sample position controls AO intensity. 98 const float maxdist = 1e-1f;110 const float maxdist = 5e-1f; 99 111 //const float scale = 50.0f; 100 112 101 113 float distance_intensity = maxdist - length_to_sample; 114 distance_intensity *= distance_intensity; 102 115 distance_intensity = max(distance_intensity, 0.0f); 103 116
Note: See TracChangeset
for help on using the changeset viewer.