Changeset 2834 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 07/13/08 23:51:02 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2833 r2834 39 39 40 40 ///////////// 41 //-- textures 41 //-- fbos 42 42 43 GLuint fbo; 44 GLuint fbo1; 45 GLuint fbo2; 46 47 bool isFirstTexture = true; 48 49 ///////////// 50 //-- renderbuffers 51 43 52 44 53 GLuint depthBuffer; … … 46 55 GLuint positionsBuffer; 47 56 GLuint colorsBuffer; 57 GLuint colorsBuffer1; 58 GLuint colorsBuffer2; 48 59 GLuint normalsBuffer; 60 61 62 ///////////// 63 //-- textures 64 49 65 50 66 GLuint positionsTex; 51 67 GLuint colorsTex; 68 GLuint colorsTex1; 69 GLuint colorsTex2; 70 52 71 GLuint normalsTex; 53 72 … … 169 188 170 189 // ssao number of samples 171 #define NUM_SAMPLES 8 190 //#define NUM_SAMPLES 8 191 #define NUM_SAMPLES 16 172 192 173 193 // ssao random spherical samples 174 194 static float samples[NUM_SAMPLES * 2]; 195 196 static Matrix4x4 matProjectionView = IdentityMatrix(); 175 197 176 198 … … 249 271 250 272 static CGparameter sModelViewProjMatrixParam; 273 static CGparameter sOldModelViewProjMatrixParam; 251 274 static CGparameter sMaxDepthParam; 252 275 static CGparameter sMaxDepthParamTex; 253 276 254 277 static CGparameter sSamplesParamSsao; 255 //static CGparameter sNoiseMultiplierParam;; 256 257 278 279 static CGparameter sOldTexParam; 280 static CGparameter sOldTexParamSsao; 281 282 static CGparameter sNoiseMultiplierParam; 258 283 259 284 static void cgErrorCallback() … … 439 464 void InitCg(void) 440 465 { 441 GenerateSamples();442 443 466 // Setup Cg 444 467 cgSetErrorCallback(cgErrorCallback); … … 488 511 489 512 cgGLSetParameter1f(sMaxDepthParamTex, 10.0f / myfar); 513 Debug << "maxdepth: " << 10.0f / myfar << endl; 490 514 } 491 515 else … … 535 559 sNormalsTexParamSsao = cgGetNamedParameter(sCgSsaoProgram, "normals"); 536 560 sNoiseTexParamSsao = cgGetNamedParameter(sCgSsaoProgram, "noiseTexture"); 537 //sNoiseMultiplierParam = cgGetNamedParameter(sCgSsaoProgram, "noiseMultiplier"); 561 sNoiseMultiplierParam = cgGetNamedParameter(sCgSsaoProgram, "noiseMultiplier"); 562 sOldModelViewProjMatrixParam = cgGetNamedParameter(sCgSsaoProgram, "oldModelViewProj"); 538 563 539 564 cgGLDisableTextureParameter(sNoiseTexParamSsao); 540 565 541 566 sSamplesParamSsao = cgGetNamedParameter(sCgSsaoProgram, "samples"); 567 sOldTexParamSsao = cgGetNamedParameter(sCgSsaoProgram, "oldTex"); 568 569 GenerateSamples(); 542 570 cgGLSetParameterArray2f(sSamplesParamSsao, 0, NUM_SAMPLES, (const float *)samples); 543 571 } … … 561 589 sPositionsTexParam = cgGetNamedParameter(sCgDeferredProgram, "positions"); 562 590 sColorsTexParam = cgGetNamedParameter(sCgDeferredProgram, "colors"); 563 sNormalsTexParam = cgGetNamedParameter(sCgDeferredProgram, "normals"); 591 sNormalsTexParam = cgGetNamedParameter(sCgDeferredProgram, "normals"); 592 593 sOldTexParam = cgGetNamedParameter(sCgDeferredProgram, "oldTex"); 564 594 } 565 595 else … … 569 599 PrintGLerror("init"); 570 600 571 cout << "cg initiali sed" << endl;601 cout << "cg initialization successful" << endl; 572 602 } 573 603 … … 619 649 glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorsBuffer); 620 650 621 glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA 8, texWidth, texHeight);651 glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA16F_ARB, texWidth, texHeight); 622 652 int samples = 8; 623 653 //glEnable(GL_MULTISAMPLE_ARB); … … 628 658 glBindTexture(GL_TEXTURE_2D, colorsTex); 629 659 630 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA 8, texWidth, texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);660 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 631 661 glGenerateMipmapEXT(GL_TEXTURE_2D); 632 662 glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, colorsTex, 0); … … 651 681 glGenTextures(1, &positionsTex); 652 682 glBindTexture(GL_TEXTURE_2D, positionsTex); 653 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, 683 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 654 684 //glGenerateMipmapEXT(GL_TEXTURE_2D); 655 685 glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_2D, positionsTex, 0); … … 675 705 glGenTextures(1, &normalsTex); 676 706 glBindTexture(GL_TEXTURE_2D, normalsTex); 677 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texWidth, texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); 678 //glGenerateMipmapEXT(GL_TEXTURE_2D); 707 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texWidth, texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); 679 708 glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_TEXTURE_2D, normalsTex, 0); 680 709 … … 699 728 PrintFBOStatus(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)); 700 729 730 731 732 ////////////////////////////////// 733 734 735 736 glGenFramebuffersEXT(1, &fbo1); 737 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo1); 738 739 740 //////////// 741 //-- colors buffer 742 743 glGenRenderbuffersEXT(1, &colorsBuffer1); 744 glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorsBuffer1); 745 746 glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA16F_ARB, texWidth, texHeight); 747 glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, colorsBuffer1); 748 749 glGenTextures(1, &colorsTex1); 750 glBindTexture(GL_TEXTURE_2D, colorsTex1); 751 752 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 753 glGenerateMipmapEXT(GL_TEXTURE_2D); 754 glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, colorsTex1, 0); 755 756 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 757 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); 758 759 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 760 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 761 762 PrintFBOStatus(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)); 763 764 765 766 ///////////////////////// 767 768 glGenFramebuffersEXT(1, &fbo2); 769 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo2); 770 771 772 //////////// 773 //-- colors buffer 774 775 glGenRenderbuffersEXT(1, &colorsBuffer2); 776 glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, colorsBuffer2); 777 778 glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA16F_ARB, texWidth, texHeight); 779 glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, colorsBuffer2); 780 781 glGenTextures(1, &colorsTex2); 782 glBindTexture(GL_TEXTURE_2D, colorsTex2); 783 784 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, NULL); 785 glGenerateMipmapEXT(GL_TEXTURE_2D); 786 glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, colorsTex2, 0); 787 788 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 789 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); 790 791 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 792 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 793 794 PrintFBOStatus(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)); 795 701 796 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 702 797 … … 917 1012 void SetupEyeView() 918 1013 { 1014 Matrix4x4 matViewing, matProjection; 1015 1016 if (renderType == RenderState::DEFERRED) 1017 { 1018 cgGLSetMatrixParameterfc(sOldModelViewProjMatrixParam, (const float *)matProjectionView.x); 1019 } 1020 919 1021 glMatrixMode(GL_PROJECTION); 920 1022 glLoadIdentity(); … … 932 1034 glLightfv(GL_LIGHT1, GL_POSITION, position1); 933 1035 1036 1037 camera->GetModelViewMatrix(matViewing); 1038 camera->GetProjectionMatrix(matProjection); 1039 1040 matProjectionView = matViewing * matProjection; 934 1041 935 1042 if (renderType == RenderState::DEFERRED) … … 942 1049 static Matrix4x4 identity = IdentityMatrix(); 943 1050 cgGLSetMatrixParameterfc(SceneEntity::sModelMatrixParam, (const float *)identity.x); 944 } 1051 } 945 1052 } 946 1053 … … 1124 1231 perfGraph->AddData(algTime); 1125 1232 1126 /*float col[3];1127 switch (renderMode)1128 {1129 case RenderTraverser::CHCPLUSPLUS:1130 col[0] = 1.0f; col[1] = 0.0f; col[2] = 0.0f;1131 break;1132 case RenderTraverser::CHC:1133 col[0] = 0.0f; col[1] = 1.0f; col[2] = 1.0f;1134 break;1135 case RenderTraverser::STOP_AND_WAIT:1136 col[0] = 1.0f; col[1] = 1.0f; col[2] = 0.0f;1137 break;1138 case RenderTraverser::CULL_FRUSTUM:1139 col[0] = 1.0f; col[1] = 0.0f; col[2] = 1.0f;1140 break;1141 default:1142 col[0] = 1.0f; col[1] = 0.0f; col[2] = 0.0f;1143 }1144 perfGraph->SetGraphColor(col);1145 */1146 1233 perfGraph->Draw(); 1147 1234 } … … 1152 1239 1153 1240 DisplayStats(); 1241 1242 isFirstTexture = !isFirstTexture; 1154 1243 1155 1244 glutSwapBuffers(); … … 1530 1619 glPushMatrix(); 1531 1620 glLoadIdentity(); 1621 1532 1622 gluOrtho2D(0, winWidth, 0, winHeight); 1533 1623 … … 1540 1630 void End2D() 1541 1631 { 1632 glMatrixMode(GL_PROJECTION); 1542 1633 glPopMatrix(); 1634 1543 1635 glMatrixMode(GL_MODELVIEW); 1544 1636 glPopMatrix(); … … 1570 1662 1571 1663 const float offs = box.Size().x * 0.3f; 1572 //const float yoffs = box.Size().y * 0.5f; 1573 1664 1574 1665 Vector3 pos = camera->GetPosition(); 1575 1666 … … 1578 1669 visCamera->SetPosition(vizpos); 1579 1670 1671 glPushAttrib(GL_VIEWPORT_BIT); 1580 1672 glViewport(winWidth - winWidth / 3, winHeight - winHeight / 3, winWidth / 3, winHeight / 3); 1581 1673 1582 1674 glMatrixMode(GL_PROJECTION); 1675 glPushMatrix(); 1676 1583 1677 glLoadIdentity(); 1584 1678 … … 1586 1680 1587 1681 glMatrixMode(GL_MODELVIEW); 1682 glPushMatrix(); 1588 1683 1589 1684 visCamera->SetupCameraView(); … … 1609 1704 visualization->Render(); 1610 1705 1611 // reset vp 1612 glViewport(0, 0, winWidth, winHeight); 1706 1707 // reset previous settings 1708 glPopAttrib(); 1709 1710 glMatrixMode(GL_PROJECTION); 1711 glPopMatrix(); 1712 glMatrixMode(GL_MODELVIEW); 1713 glPopMatrix(); 1613 1714 } 1614 1715 … … 1880 1981 1881 1982 1983 void DisplayRenderTexture3() 1984 { 1985 glEnable(GL_TEXTURE_2D); 1986 1987 if (isFirstTexture) 1988 glBindTexture(GL_TEXTURE_2D, colorsTex1); 1989 else 1990 glBindTexture(GL_TEXTURE_2D, colorsTex2); 1991 1992 glDisable(GL_LIGHTING); 1993 1994 glMatrixMode(GL_PROJECTION); 1995 glPushMatrix(); 1996 glLoadIdentity(); 1997 1998 glMatrixMode(GL_MODELVIEW); 1999 glPushMatrix(); 2000 glLoadIdentity(); 2001 2002 const float offs = 0.5f; 2003 glOrtho(-offs, offs, -offs, offs, 0, 1); 2004 2005 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 2006 2007 glColor4f(1.0f, 1.0f, 1.0f, 1.0f); 2008 glBegin(GL_QUADS); 2009 2010 glTexCoord2f(0, 0); glVertex3f(-offs, -offs, -0.5f); 2011 glTexCoord2f(1, 0); glVertex3f( offs, -offs, -0.5f); 2012 glTexCoord2f(1, 1); glVertex3f( offs, offs, -0.5f); 2013 glTexCoord2f(0, 1); glVertex3f(-offs, offs, -0.5f); 2014 2015 glEnd(); 2016 2017 glEnable(GL_LIGHTING); 2018 glDisable(GL_TEXTURE_2D); 2019 2020 glMatrixMode(GL_PROJECTION); 2021 glPopMatrix(); 2022 2023 glMatrixMode(GL_MODELVIEW); 2024 glPopMatrix(); 2025 2026 PrintGLerror("displaytexture3"); 2027 } 2028 2029 1882 2030 void DisplayRenderTexture() 1883 2031 { 2032 GLuint oldTex; 2033 2034 if (isFirstTexture) 2035 { 2036 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo1); 2037 oldTex = colorsTex2; 2038 } 2039 else 2040 { 2041 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo2); 2042 oldTex = colorsTex1; 2043 } 2044 2045 glPushAttrib(GL_VIEWPORT_BIT); 2046 glViewport(0, 0, texWidth, texHeight); 2047 2048 glDrawBuffers(1, mrt); 2049 1884 2050 glDisable(GL_ALPHA_TEST); 1885 2051 glDisable(GL_TEXTURE_2D); … … 1906 2072 cgGLBindProgram(sCgSsaoProgram); 1907 2073 2074 cgGLSetTextureParameter(sPositionsTexParamSsao, positionsTex); 1908 2075 cgGLEnableTextureParameter(sPositionsTexParamSsao); 1909 cgGLSetTextureParameter(sPositionsTexParamSsao, positionsTex); 1910 2076 2077 cgGLSetTextureParameter(sColorsTexParamSsao, colorsTex); 1911 2078 cgGLEnableTextureParameter(sColorsTexParamSsao); 1912 cgGLSetTextureParameter(sColorsTexParamSsao, colorsTex); 1913 2079 2080 cgGLSetTextureParameter(sNormalsTexParamSsao, normalsTex); 1914 2081 cgGLEnableTextureParameter(sNormalsTexParamSsao); 1915 cgGLSetTextureParameter(sNormalsTexParamSsao, normalsTex); 1916 2082 2083 cgGLSetTextureParameter(sNoiseTexParamSsao, noiseTex); 1917 2084 cgGLEnableTextureParameter(sNoiseTexParamSsao); 1918 cgGLSetTextureParameter(sNoiseTexParamSsao, noiseTex); 1919 1920 //cgGLSetParameter1f(sNoiseMultiplierParam, RandomValue(3.0f, 7.0f)); 2085 2086 cgGLSetTextureParameter(sOldTexParamSsao, oldTex); 2087 cgGLEnableTextureParameter(sOldTexParamSsao); 2088 2089 cgGLSetParameter1f(sNoiseMultiplierParam, RandomValue(3.0f, 17.0f)); 2090 2091 //GenerateSamples(); cgGLSetParameterArray2f(sSamplesParamSsao, 0, NUM_SAMPLES, (const float *)samples); 1921 2092 } 1922 2093 else … … 1924 2095 cgGLBindProgram(sCgDeferredProgram); 1925 2096 2097 cgGLSetTextureParameter(sPositionsTexParam, positionsTex); 1926 2098 cgGLEnableTextureParameter(sPositionsTexParam); 1927 cgGLSetTextureParameter(sPositionsTexParam, positionsTex); 1928 2099 2100 cgGLSetTextureParameter(sColorsTexParam, colorsTex); 1929 2101 cgGLEnableTextureParameter(sColorsTexParam); 1930 cgGLSetTextureParameter(sColorsTexParam, colorsTex); 1931 2102 2103 cgGLSetTextureParameter(sNormalsTexParam, normalsTex); 1932 2104 cgGLEnableTextureParameter(sNormalsTexParam); 1933 cgGLSetTextureParameter(sNormalsTexParam, normalsTex); 2105 2106 cgGLSetTextureParameter(sOldTexParam, oldTex); 2107 cgGLEnableTextureParameter(sOldTexParam); 1934 2108 } 1935 2109 … … 1952 2126 glEnd(); 1953 2127 1954 cgGLDisableTextureParameter(sColorsTexParamSsao);1955 cgGLDisableTextureParameter(sPositionsTexParamSsao);1956 cgGLDisableTextureParameter(sNormalsTexParamSsao);1957 2128 1958 2129 if (useSsao) 2130 { 2131 cgGLDisableTextureParameter(sColorsTexParamSsao); 2132 cgGLDisableTextureParameter(sPositionsTexParamSsao); 2133 cgGLDisableTextureParameter(sNormalsTexParamSsao); 1959 2134 cgGLDisableTextureParameter(sNoiseTexParamSsao); 2135 cgGLDisableTextureParameter(sOldTexParamSsao); 2136 } 2137 else 2138 { 2139 cgGLDisableTextureParameter(sColorsTexParam); 2140 cgGLDisableTextureParameter(sPositionsTexParam); 2141 cgGLDisableTextureParameter(sNormalsTexParam); 2142 cgGLDisableTextureParameter(sOldTexParam); 2143 } 1960 2144 1961 2145 cgGLDisableProfile(RenderState::sCgFragmentProfile); … … 1970 2154 glPopMatrix(); 1971 2155 1972 2156 glPopAttrib(); 2157 1973 2158 PrintGLerror("displaytexture"); 2159 2160 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 2161 2162 DisplayRenderTexture3(); 1974 2163 } 1975 2164 … … 2014 2203 #else 2015 2204 2016 /*void GenerateSamples()2017 {2018 float scale = 1.0f / (float)NUM_SAMPLES;2019 2020 ////////2021 //-- generate uniformly distributed spherical samples2022 2023 for (int i = 0; i < NUM_SAMPLES; ++ i)2024 {2025 // create stratified samples over sphere2026 const float rx = ((float)i + RandomValue(0, 1)) * scale;2027 const float ry = ((float)i + RandomValue(0, 1)) * scale;2028 2029 const float theta = 2.0f * acos(sqrt(1.0f - rx));2030 const float phi = 2.0f * M_PI * ry;2031 2032 Vector3 unit = Vector3(sin(theta) * cos(phi), sin(theta) * sin(phi), cos(theta));2033 2034 //////2035 //-- we sample in texture space => store 2D component2036 2037 // q: project to plane or just drop z?2038 Vector3 proj = unit / (1.0f + fabs(unit.z));2039 //Vector3 proj = unit;2040 2041 samples[i + 0] = proj.x;2042 samples[i + 1] = proj.y;2043 //cout << samples[i] << " " << samples[i + 1] << endl;2044 }2045 }*/2046 2205 2047 2206 void GenerateSamples() 2048 2207 { 2049 2208 // generates poisson distribution on disc 2050 //float factor = 5.0f; 2051 float minDist = 2.0f;//factor / sqrt((float)NUM_SAMPLES); 2052 2053 cout << "minDist= " << minDist << endl; 2209 float minDist = 2.0f / sqrt((float)NUM_SAMPLES); 2210 2211 //cout << "minDist before= " << minDist << endl; 2054 2212 2055 2213 for (int i = 0; i < NUM_SAMPLES * 2; i += 2) … … 2096 2254 } 2097 2255 } 2098 cout << "sample: " << samples[i] << " " << i /2 << " " << samples[i + 1] << " r: " << sqrt(samples[i] * samples[i] + samples[i + 1] * samples[i + 1]) << " tries: " << totalTries << endl;2099 } 2100 2101 cout << "minDist= " << minDist << endl;2256 //cout << "sample: " << samples[i] << " " << i /2 << " " << samples[i + 1] << " r: " << sqrt(samples[i] * samples[i] + samples[i + 1] * samples[i + 1]) << " tries: " << totalTries << endl; 2257 } 2258 2259 //cout << "minDist after= " << minDist << endl; 2102 2260 } 2103 2261 … … 2118 2276 float t2 = w_far * 0.5f; 2119 2277 2278 #if 0 2120 2279 bl = Normalize(-Vector3(-t1, -t2, 1.0f)); 2121 2280 br = Normalize(-Vector3( t1, -t2, 1.0f)); 2122 2281 tl = Normalize(-Vector3(-t1, t2, 1.0f)); 2123 2282 tr = Normalize(-Vector3( t1, t2, 1.0f)); 2124 2283 #else 2284 bl = -Normalize(camera->GetDirection()); 2285 br = -Normalize(camera->GetDirection()); 2286 tl = -Normalize(camera->GetDirection()); 2287 tr = -Normalize(camera->GetDirection()); 2288 #endif 2125 2289 // normalize to 0 .. 1 2126 2290 bl = bl * 0.5f + 0.5f;
Note: See TracChangeset
for help on using the changeset viewer.