- Timestamp:
- 12/07/08 23:26:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
r3168 r3212 65 65 uniform float3 br, 66 66 uniform float3 tl, 67 uniform float3 tr 68 , uniform float3 viewDir 67 uniform float3 tr, 68 float3 viewDir, 69 float sampleIntensity 69 70 ) 70 71 { … … 125 126 const float denom = (DISTANCE_SCALE + magSample * magSample); 126 127 127 float2 intensity = float2( SAMPLE_INTENSITY, ILLUM_INTENSITY);128 float2 intensity = float2(sampleIntensity, ILLUM_INTENSITY); 128 129 intensity /= denom; 129 130 … … 161 162 uniform float3 br, 162 163 uniform float3 tl, 163 uniform float3 tr 164 uniform float3 tr, 165 uniform float kernelRadius, 166 uniform float sampleIntensity 164 167 ) 165 168 { 166 169 pixel2 OUT; 167 170 168 const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)) ;171 const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)).xyz; 169 172 170 173 … … 180 183 float4 currentPos = mul(modelViewProj, eyeSpacePos); 181 184 182 const float w = SAMPLE_RADIUS/ currentPos.w;185 const float w = kernelRadius / currentPos.w; 183 186 currentPos /= currentPos.w; 184 187 … … 188 191 //-- compute color bleeding + ao 189 192 190 GiStruct gi = globIllum(IN, colors, noiseTex, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view) );193 GiStruct gi = globIllum(IN, colors, noiseTex, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view), sampleIntensity); 191 194 192 195
Note: See TracChangeset
for help on using the changeset viewer.