T2k

Members
  • Content count

    1040
  • Joined

  • Last visited

Community Reputation

220 Neutral

About T2k

  • Rank
    Contributor
  1. GeForce 8800GTX Benchmarks

    about these 2 SLI connectors, does it really allow only 3 cards? or cant you connect more with it (i dont know much about SLI but i would say it should be possible to build some sort of chain/ring with n cards)?
  2. What gives us the right to eat other creatures?

    you know... if aliens came to earth... there is a slight chance that we slaughter them, take their technology and use them as our new food source, because little gray pansies must taste good! on a more serious note: i would say dont eat anything that tells you in an intelligent way to not eat it (no writing "dont eat me" on a slice of cheese wont cut it)... all the other stuff is just food and the decision if its right or wrong is just an illusion of the (human)mind. there is no intergalactic guide to what 'god' thinks is good or bad. and as someone already mentioned, we cant survive by just eating the minerals. Our body needs some chemicals that it cant produce itself... T2k
  3. Hibernate

    Quote:Original post by kSquared ... Hibernate is a "no power" mode (that's not quite true, but it's close enough)... Because using no power is much nicer to a battery than using low power, a perfectly efficient laptop in hibernate will theoretically never run out of power. In actuality, because the battery slowly discharges even when it's not in use, you can last about 4-5 weeks on hibernate on a 3000mA-h full charge battery. One hopes you'd have found a power outlet by then. ;) thats not quite correct, hibernate is a 100% no power mode, you can even remove the battery if you want without any AC power. as long as your HD doesnt lose any information you are fine T2k
  4. Quake Wars MegaTexture

    what i think a megatexture is: first off, try to imagine a graph 2D that displays on its y axis numbers in a really huge range, what you most likely do is dont display them uniformly, but use a logarithmic scale. You can see this sometimes when someone trys to display information in a graph and make them dont look that bad... ok, so lets do it in 2d...using one texture 4k*4k, if you say the mid of it is where the most detail is and going farther away reduces the detail you get a texture where in the center ~512x512pixel width you have 1pixel=1unit and the farther away you get the less pixels per worldunit you get, means at the border you have something like 1texturepixel is 1³*1³ square world units big... if you now look horizontally along the texture it would get less screenpixels the farther away you look, the distance is increasing exponentially relative to screen pixels, so you can just use one texture to draw your vastely huge terrain that matches this quality decrease with distance... all you have todo is to get some formulas right (from one logarithm to another or so)... in a different approach you would use lower quality textures the farther away the geometry is... this time you got the low res texture already given in your logarithmic/megatexture, all you have todo is let the gfx card calculate the texture coordinates properly, means for geometry close to the viewer one worldunit could result in texturcoordinates of 2000px to 2500px (500texturepixel per worldunit) and for geometry further away something like 3500px to 3510px (10texturepixel per worldunit) now iam not that good in math to get you an exact formula between angle of terrain and viewer, and doing some offset calculation could also be tricky, but i dont see anything that cant be done in a fragmentshader (a vertexshader wouldnt work as it does linear interpolation of texture coordinates where you need them to be logarithmic) all you then have todo is to 'somehow' generate the megatexture (i have no idea howto do that for a logarithmic texture) and get a relative good log function in your shader am i right? am i? :p T2k
  5. my router is on 24/7... so uhm 24h/day... na seriously i spend like all my time using it, even if i travel i use my PDA to read ebooks and stuff... => ~13-15h, the rest is spend by sleep, food and cleansing ma body... T2k
  6. Was my computer attacked?

    just clear your icon cache and dont install any freaking browser too fix such a small problem, really... howto clear the icon cache? well i have no idea howto do it without the help of a tool like tortoisecvs that give you an option "renew symbols". T2k
  7. am i blind or are you missing texture coordinates?, especially the little bit that for multitexturing you use glMultiTexCoord and not glTexCoord... but then i really dont see why you set the texturematrix in your example... and IMHO it shouldnt work that way at all (without texcoords or generating them that is) T2k
  8. I wondered how long until we got an april fools joke

    Quote:Original post by Gunslinger RR I have to say though, I like the colors! [grin] I love this day yeah, too bad its only for one day... it doesnt look that bad with the active topics on top and the active users at the bottom... however the colors arent the black theme... T2k
  9. Guess The Film Scene 2!

    Quote:Original post by owl French people might catch this one... immortal, no iam not french T2k
  10. Someone needs a time-out

    yes, it IS german and he IS playing Unreal Tournament, but iam not willing to translate his brabblings, because 90% are just cursing around and the other 10% are not understandable... but i really think its sad that such Psychotic people are allowed to play such games. I think it would be better for them and everyone around them to be under constant observation + medical stuff that keeps them calm... T2k
  11. Quote:Original post by eq Quote:you should mention that your source for a solution doesnt work: Under what compiler?! Must have a compiler that understands __declspec(naked) and __fastcall. My code did work on my compiler anyway (Intel8.1). The assembler part of the code works for sure, the problem is the C++/asm interfacing part which is compiler specific (should have written the test program as a full .asm program, but how many would have been able to build and test that?). The code I presented is a direct port of my C++ solution on page 5. Quote:also think that without disabling div0 exceptions it is not possible to solve that problem under these 'restrictions' without doing some ugly stuff (you can generate the ASM on your own...): The code I presented NEVER divides by zero.. I also gave an explenation on how to easily solve this on page 6 or 7. Edit: Was actually on page 5: Quote: Funny it seems like everyone is trying to solve the problem by testing the sign. My solution instead is trying to test for zero and use that, a robust way to test for zero is IsZero = (x - 1) / 0xffffffff. Since we can test for zero it's easy to test if A is greater than B using IsAGreater = IsZero(B / A). Now IsAGreater is one if A > B else it's zero, using this as a select switch Result = IsAGreater * A + (1 - IsAGreater) * B. To avoid the divison by zero when A = 0, just handle this special case changing to IsAGreater = IsZero(B / (A + IsZero(A))). compiler used in Visual c++ Express 05, i also didnt mean your code divides by zero but generally, and no iam NOT testing the sign i just removed the MSB so i could add 1 to it and do the test then (the MSB code version will not set the carry flag), using your quoted robust method the algo shortens to (basically what the quote with the robust method describes): unsigned int Max(unsigned int a, unsigned int b){ unsigned int iszerob= (b-1)/-1; unsigned int result = a/(b+iszerob); result= (result-1)/-1; return a*(1-result) + result*b; } T2k
  12. Quote:Original post by eq Quote:Original post by RenderTarget This one breaks the rule because it needs a dereference, but I like it. Requires a teeny bit of preprocessing too... *** Source Snippet Removed *** unsigned long long sz = 1 << ( sizeof( unsigned int ) * 4 ); Doesn't give 2^32 for 32 bits, but rather 2^16. So the valid input range is [0, 2^NumberOfBitsDividedByTwo). The correct line should read: unsigned long long sz = 1 << ( sizeof( unsigned int ) * 8 ); But as other posters said it's not practical, plus it doesn't comply to the rule that only + - / * operators are valid (remeber that [] is an operator). Another challange: Write the shortest (least number of instructions) solution for the same problem in x86 assembler, using nothing more than the add, sub, div, mul and mov instructions (immediates and registers are the only allowed operands). The solution must work for ALL possible 32-bit unsigned integers. Source for a solution and a function test: *** Source Snippet Removed *** Please don't submit any solution that doesn't pass the test. you should mention that your source for a solution doesnt work: ... Found 2211 errors! i also think that without disabling div0 exceptions it is not possible to solve that problem under these 'restrictions' without doing some ugly stuff (you can generate the ASM on your own...): unsigned int Max(unsigned int a, unsigned int b){ //move MSB to a tmp var unsigned int tmp= b/0x80000000; unsigned int b_tmp= b-tmp*0x80000000; unsigned int iszerob= (((0x80000000-b_tmp)/0x80000000)+(1-tmp))/2;//store if(b_tmp==0 and MSB==0) in iszero unsigned int result = a/(b+iszerob); tmp= result/0x80000000; result= result-tmp*0x80000000; result= (((0x80000000-result)/0x80000000)+(1-tmp))/2; return a*(1-result) + result*b;//if(!result) a else b } if you ask yourself why i move the MSB, just remember that 0x80000000-b would be zero for b==0x80000000... and this algo is made under the assumption that no div0 is allowed edit: oh of course i assumed unsigned int == 32bit, but that is no big problem, replacing 0x80000000 with ((unsigned int)(-1)/2+1) isnt that hard... T2k
  13. will this thread never die? AND WHEN WILL PEOPLE READ STUFF THEY REPLY TO, arghh ;) just a quote, from the 5th page of this thread: Quote:Original post by digitec devil unsigned int max(unsigned int a, unsigned int b) { bool result = a/b; return a*result + (1-result)*b; } I haven't been able to break it, and I'll just say I exclude 0 from the natural numbers ( to address possible divide by 0 that is) now as you see if b is 0 we got a div by zero, in most cases that is fine, because you can get div by zero silenced, the other problem is when a and b are zero 0/0 is undefined and therefore in 'real' math a problem (could also mean that our FPU returns 1 or such stuff there, no problem for this algorithm because it will return 0 anyway) but if you remove the case that b can be zero you never get 0/0, only 0/(b!=0), so no problem in pure mathematical sense now looking at what happens when b is zero is important, as the OP mentioned unsigned ints (not signed!) you can assume that if b is zero then whatever a is (0 to maxint) it will be the right choise. The problematic line: bool result = a/b; now modifying it to bool result = a/(b!=0); will do the trick, but how. if b is zero you could say a/0 is equal to a/1 as it will return bool(a>0)=true for a>0 and bool(0/1)=false for a==0 in mathterms you would define div_by_zero to equal div_by_one for this situation or even div_by_zero= +inf, which clamped to a bool is 0 or 1... assumed +inf != 0 here again for clarity: a/0 means (a>=0), and a/1 means (a>=1)==(a>0) so what is done here is to change the result for the case a=b=0 from returning a to returning b, what in both cases returns a 0 the final solution is to add to b one when b is zero: unsigned int max(unsigned int a, unsigned int b) { bool isbZero= !bool(b); // b==0 bool result = a/(isbZero+b);//(b>0 && a>b) || a>0 return a*result + (1-result)*b;//if(result) a else b } obviously the code will only work as long as false equals 0, on systems where this isnt the case you need to modify it a bit... ps: i know... noone will read it... so continue replying: "i didnt read the thread but <x> came up with: ..." T2k
  14. Absurdly slow code

    what exactly do you mean by slow? glBindTexture will not take ~300ms to execute only exception i could think of is that you are in software rendering mode (mesa opengl, 'successfully' linking with opengl.lib instead of opengl32.lib...) also you shouldnt use l3 as an indicator of whether the texture is loaded or not, because you use it also for rotation. means if it is of type char for example you will load the image every 256th call... slowness on some old hardware can also be caused by huge textures and (bi)linear filtering (the default GL_LINEAR for the MAG filter) but it could be anything else, like your measuring method (wrongly calculating FPS etc) PS: you also shouldnt use MessageBoxes for such 'debug' output, if you dont have a console for output (non Console APP) create one with AllocConsole()... T2k