Changeset 3299 for GTP/trunk/App
- Timestamp:
- 02/11/09 15:52:01 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3297 r3299 396 396 sCgCombineIllumProgram = sm->CreateFragmentProgram("globillum", "combine", "CombineGi"); 397 397 //sCgCombineSsaoProgram = sm->CreateFragmentProgram("combineSsao", "CombineSsaoHalfRes", "CombineSsao"); 398 sCgCombineSsaoProgram = sm->CreateFragmentProgram("combineSsao ", "CombineSsaoFullRes", "CombineSsao");398 sCgCombineSsaoProgram = sm->CreateFragmentProgram("combineSsaoSep", "CombineSsaoFullRes", "CombineSsao"); 399 399 sCgAntiAliasingProgram = sm->CreateFragmentProgram("antialiasing", "main", "AntiAliasing"); 400 400 sCgToneProgram = sm->CreateFragmentProgram("tonemap", "ToneMap", "ToneMap"); … … 443 443 //////////////// 444 444 445 string combineSsaoParams[] =445 /*string combineSsaoParams[] = 446 446 {"colorsTex", "normalsTex", "ssaoTex", "filterOffs", "filterWeights", 447 447 "ssaoFilterRadius", "modelViewProj", "bl", "br", "tl", 448 448 "tr", "w", "h"}; 449 450 sCgCombineSsaoProgram->AddParameters(combineSsaoParams, 0, 13); 449 */ 450 string combineSsaoParams[] = 451 {"colorsTex", "ssaoTex", "bl", "br", "tl", "tr", "xyStep"}; 452 453 //sCgCombineSsaoProgram->AddParameters(combineSsaoParams, 0, 13); 454 sCgCombineSsaoProgram->AddParameters(combineSsaoParams, 0, 7); 455 451 456 452 457 ////////////// … … 1033 1038 1034 1039 sCgCombineSsaoProgram->SetTexture(i ++, colorsTex); 1035 sCgCombineSsaoProgram->SetTexture(i ++, normalsTex);1036 1040 sCgCombineSsaoProgram->SetTexture(i ++, ssaoTex); 1037 1041 1038 sCgCombineSsaoProgram->SetArray2f(i ++, (float *)ssaoFilterOffsets, NUM_SSAO_FILTER_SAMPLES);1039 sCgCombineSsaoProgram->SetArray1f(i ++, (float *)ssaoFilterWeights, NUM_SSAO_FILTER_SAMPLES);1040 sCgCombineSsaoProgram->SetValue1f(i ++, mSsaoFilterRadius);1041 1042 sCgCombineSsaoProgram->SetMatrix(i++, mProjViewMatrix);1042 //sCgCombineSsaoProgram->SetArray2f(i ++, (float *)ssaoFilterOffsets, NUM_SSAO_FILTER_SAMPLES); 1043 //sCgCombineSsaoProgram->SetArray1f(i ++, (float *)ssaoFilterWeights, NUM_SSAO_FILTER_SAMPLES); 1044 //sCgCombineSsaoProgram->SetValue1f(i ++, mSsaoFilterRadius); 1045 1046 //sCgCombineSsaoProgram->SetMatrix(i++, mProjViewMatrix); 1043 1047 1044 1048 for (int j = 0; j < 4; ++ j, ++ i) … … 1047 1051 } 1048 1052 1049 sCgCombineSsaoProgram->SetValue1f(i ++, mIllumFbo->GetColorBuffer(mIllumFboIndex)->GetWidth());1050 sCgCombineSsaoProgram->SetValue 1f(i ++, mIllumFbo->GetColorBuffer(mIllumFboIndex)->GetHeight());1053 //sCgCombineSsaoProgram->SetValue2f(i ++, 1.0f / (float)mWidth, 1.0f / (float)mHeight); 1054 sCgCombineSsaoProgram->SetValue2f(i ++, 1.0f / (float)mWidth, 0); 1051 1055 1052 1056 DrawQuad(sCgCombineSsaoProgram); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3298 r3299 66 66 #define USE_GTX 67 67 68 #define SSAO_FILTER_RADIUS 3 69 68 70 #endif // __SHADERENV_H -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3298 r3299 107 107 uniform float3 tl, 108 108 uniform float3 tr, 109 uniform float w, 110 uniform float h 109 uniform float2 resolution 111 110 ) 112 111 { … … 200 199 uniform float3 tl, 201 200 uniform float3 tr, 202 uniform float w, 203 uniform float h 201 uniform float2 resolution 204 202 ) 205 203 { … … 233 231 // just apply ssao if we are not in the sky 234 232 if (col.w < 1e10f) 233 { 235 234 OUT.illum_col.xyz = col.xyz * max(2e-2f, 1.0f - ao.x); 236 235 //OUT.illum_col.xyz = col.xyz * ao.x; 236 } 237 237 else 238 { 238 239 OUT.illum_col.xyz = col.xyz; 240 } 239 241 240 242 OUT.illum_col.w = col.w; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/vienna.env
r3295 r3299 78 78 79 79 # the used render method (forward, forward + depth pass, deferred, deferred + depth pass 80 #renderMethod=281 renderMethod=080 renderMethod=2 81 #renderMethod=0 82 82 83 83 #modelPath=data/city/model/
Note: See TracChangeset
for help on using the changeset viewer.