Changeset 3008 for GTP/trunk/App/Demos/Vis/FriendlyCulling
- Timestamp:
- 10/06/08 16:00:35 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3007 r3008 617 617 glDisable(GL_LIGHTING); 618 618 glDisable(GL_BLEND); 619 glDisable(GL_DEPTH_TEST); 619 620 620 621 glPushAttrib(GL_VIEWPORT_BIT); … … 631 632 glPushMatrix(); 632 633 glLoadIdentity(); 633 634 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);635 634 636 635 if (shadowMap) … … 724 723 glDrawBuffers(1, mrt + mFboIndex); 725 724 726 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);727 728 725 729 726 cgGLBindProgram(sCgSsaoProgram); … … 837 834 GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture(); 838 835 839 //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);840 836 cgGLBindProgram(sCgAntiAliasingProgram); 841 837 … … 880 876 glDrawBuffers(1, mrt + colorBufferIdx); 881 877 882 //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);883 884 878 cgGLBindProgram(sCgDeferredProgram); 885 879 … … 943 937 GLuint oldIllumTex = mFbo->GetColorBuffer(2 - mFboIndex + 1)->GetTexture(); 944 938 945 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);946 947 939 cgGLBindProgram(sCgGiProgram); 948 940 … … 1043 1035 cgGLBindProgram(sCgCombinedIllumProgram); 1044 1036 1045 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);1046 1047 1037 1048 1038 cgGLSetTextureParameter(sColorsTexCombinedIllumParam, colorsTex); … … 1088 1078 glDrawBuffers(1, mrt + colorBufferIdx); 1089 1079 1090 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);1091 1092 1080 cgGLBindProgram(sCgCombinedSsaoProgram); 1093 1081 … … 1138 1126 1139 1127 1140 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);1141 1142 1128 cgGLBindProgram(sCgDeferredShadowProgram); 1143 1129 … … 1243 1229 glDrawBuffers(1, mrt + colorBufferIdx); 1244 1230 1245 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);1246 1247 1231 cgGLBindProgram(sCgLogLumProgram); 1248 1232 … … 1270 1254 //-- compute avg loglum in scene using mipmapping 1271 1255 1272 //glBindTexture(GL_TEXTURE_2D, fbo->GetColorBuffer(colorBufferIdx)->GetTexture());1273 //glGenerateMipmapEXT(GL_TEXTURE_2D);1256 glBindTexture(GL_TEXTURE_2D, fbo->GetColorBuffer(colorBufferIdx)->GetTexture()); 1257 glGenerateMipmapEXT(GL_TEXTURE_2D); 1274 1258 } 1275 1259 … … 1322 1306 glDrawBuffers(1, mrt + downSampleBufferIdx); 1323 1307 1324 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);1325 1308 cgGLBindProgram(sCgDownSampleProgram); 1326 1309 … … 1357 1340 1358 1341 fbo->Bind(); 1359 #if 01342 #if 1 1360 1343 colorBufferIdx = 3 - colorBufferIdx; 1361 1344 glDrawBuffers(1, mrt + colorBufferIdx); 1362 1363 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);1364 1345 1365 1346 cgGLBindProgram(sCgToneProgram); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/tonemap.cg
r3007 r3008 82 82 { 83 83 pixel OUT; 84 return OUT;84 85 85 float4 color = tex2D(colors, IN.texCoord); 86 86 … … 112 112 113 113 pixel OUT; 114 return OUT;/* 114 115 115 const float4 color = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 0)); 116 116 … … 134 134 OUT.col.w = logLumScaled; 135 135 136 return OUT; */136 return OUT; 137 137 }
Note: See TracChangeset
for help on using the changeset viewer.