Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

338 Neutral

About laeuchli

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello All, I'm reading about a Krylov method listed here(, and here I understand the first two steps, but then they say "The numerical solution of the small k × k eigenvalue problem in the statements 3 and 4 can be treated by standard algorithms for solving small dense eigenvalue problems". I'm aware of several methods for solving eigenvalue problems, but I dont know what the standard method is when you know the problem is small and dense. Which algorithm should I be looking at? Regards, Jesse
  2. laeuchli


    I thought it was funny.....
  3. laeuchli

    Card Shuffle Problem

    Ah I didn't know that..I guess that makes the problem much simpler.
  4. laeuchli

    Card Shuffle Problem

    Hello All, One of my friends had an interview the other day and was given this puzzle(we always trade questions after such things). "The exercise solves a coding problem that involves shuffling a deck of cards. The problem description is as follows: You are given a deck containing 313 cards. While holding the deck: 1. Take the top card off the deck and set it on the table 2. Take the next card off the top and put it on the bottom of the deck in your hand. 3. Continue steps 1 and 2 until all cards are on the table. This is a round. 4. Pick up the deck from the table and repeat steps 1-3 until the deck is in the original order. Write a program to determine how many rounds it will take to put the deck back into the original order." So my view on this is that its basically a permutation group, and they would like to solve the equation p.p.p....=p^n=e. If this is the case, there is no better solution then determining p and applying it till you get back to where you started. Is that correct, or is there something I'm missing here? Jesse
  5. laeuchli

    Depth Peeling Issues

    I am already writing out the depth to a 32 bit texture. I do not think depth accuracy is the issue here, since there is no Z-fighting, but I changed the clipping planes so that most of the scene was clipped out, and I still couldnt get it to work. Jesse
  6. Dear All, I'm having some problems with depth peeling. I have previously implemented this before successfully on older hardware, but I cant get my new version to work. I used to simply call into tex2dproj with projective transformed vertexes, but the profile our engine uses with cg for w/e reason no longer supports tex2dproj, so I have to scale the texture vertexes into the required range myself. This seems to be working, but I am having a lot of trouble with the comparison, the results are very low precision. I almost never seem to get any rejection of fragments, unless I use a basis, then the results become very inaccurate. Here is the code that scales the vertex positions into the range [0,1] float4x4 ScaleTexture = float4x4(float4(.5,0,0,0),float4(0,.5,0,0),float4(0,0,1,0),float4(0,0,0,1)); float4 finalposition = mul(ProjectionMatrix, pos); OUT.Position = finalposition; float4(((finalposition).xyz/(finalposition.w))+float3(1,1,0),1)); projectedtex.y = 1 - projectedtex.y; OUT.TexCoord3 = projectedtex; Pixel Shader MRT_OUT OUT; color.a = (IN.TexCoord3.z); if(firstlayer > 0) { if( color.a <= tex2D(Texture2, (IN.TexCoord3.xy) ).r)//Depth peeling section { discard; } OUT.rt2 = color.a; } else { OUT.rt2 = float4(color.a,color.a,color.a,color.a); } I have checked in PIX and the R32 Texture being passed in as depth appears to be correct. Unfortunately I cant seem to debug the pixel shader(pix complains when I try and do this). Anything seem obviously wrong? Regards, Jesse
  7. Hello All, I'm trying to write a point sprite scaling shader, so the point sprites get smaller as the camera moves further away, and larger as the camera gets nearer. This is in an app I'm working on in D3D. The documentation for D3D claims that the equation the fixed function pipeline uses is S s = Vh * S i * sqrt(1/(A + B * D e + C *( D e2 ))) Which seems simple enough. However, whenever I implement that in the following way: float4 pos = mul(ModelViewMatrix, IN.Position); float d = sqrt((pos.x*pos.x+ pos.y*pos.y+pos.z*pos.z)); float a=0; float b=0; float c = 1; OUT.Size= = 100*Vh*sqrt(1/(a + b * d + c *( d*d ))); This works for awhile until the camera gets close to the points, and then the points start to shrink again. Not sure how to deal with this. Tried various values of a,b,c etc. but no luck. Has anyone successfully done this before? Jesse
  8. Hello All, I am writing out some data using file streams that must use a period as the decimal separator, since the specification for that format requires it. However, the windows localization settings are kicking in and setting the separator to be comma. Is there a way to specifically specify what I want? I googled, and didn't see what i was looking for. Regards, Jesse
  9. laeuchli

    Cosine Taylor Series Issue

    Original post by Rattrap Quote: * Use your formula only for angles under pi/2 and use reflection to compute the others. I think this might be the absolute cheapest way, if I can figure out how. (Trig has never been one of my strong points). Quote: sin(pi-x)=sin(x) So if x < p/2, simply use your approximation for sin on x, if x> p/2 and < pi calculate pi -x = y and calculate sin(y). Similar reasoning holds for the other two quadrants. If x > pi and <3*pi/2 then do -sin(x-pi). If x >3*pi/2 and < 2*pi, then -sin(2*pi-x). Thus all your calls to your sin function will be <pi/2. If you draw a circle, and then draw some mirrored lines in the various quadrants, it will be more intuitive why this works. Jesse
  10. laeuchli

    Whats on your desk at work?

    A 30' moniter, a 19' moniter, a laptop, a bunch of books, and a ti92 :D. The first few items are optional, the ti92 is not ;-). Jesse
  11. laeuchli

    Billboards to emulate a sphere.

    That is what I thought. Thanks, Jesse
  12. Dear All, I'm having a little bit of a mental block on this subject. Suppose I have a sphere I wish to render using billboards. If the sphere is uniformly colored, it seems to me that I should be able to render this indistinguishably with billboards. However, toward what exactly should the billboard face? Should the billboard normal point toward the eye position, or the nearest point on the near plane. I've actually tried both, so I may have some other issue, but it seems to me it ought to point toward the eye position. My reasoning is that in this case the billboard perfectly bisects the visible portion of the sphere. Regards, Jesse
  13. laeuchli

    Should I take Master Degree?

    I think frob has the right idea with reading what color is your parachute. I'll just add a few thoughts on getting the masters degree. First, I think you need to take a look at what it'll cost you to get it. Can you get a scholarship? If you have a masters thats a salary negotiating chip(obviously this varies based on what university the degree is from, you need to consider which ones you can get into), but if you have to take on a ton of debt to get it, that may not be worth it. After you look at that, you should consider if this will actually help you get where you want to go. A masters degree can help you cut though the HR nonsense and get an interview with people who actually know what they are about in some fields. Sometimes there are ways around this(as detailed in what color is your parachute), sometimes not. Is where you want to go one of those sometimes not places? You need to figure out how helpful you think this will be(Which as I said, will probably vary by field), vs how much debt you need to take on, and weigh that against your level of interest in the subject, and look at what kind of courses are offered in the degree. I would say if you are sick of school, then that should be a big indicator that you should work for awhile before going back to it. Anyway, theres not really a right or wrong answer about it, it depends on a large variety of personal factors. You need to weigh them up, and make a decision thats good for you.
  14. laeuchli

    Germany as the EU hedgemon

    Quote:Original post by samoth Quote:Original post by MDI Both the French and British governments were privately against the reunification of Germany. They feared marrying a first-world nation with an essentially dirt poor, third-world nation would bring West Germany's economy down, and with it the rest of Europe. This wasn't some wacky fear, it was a very real risk at the time.Fear and risk are not preceisely the right words. The reunification pretty much ruined Germany. A few people filled their pockets just fine, but for the greater part, this was the greatest desaster since the war. According to the chart Lessbread posted above their GDP looks to be in proportion to their size. How do you reconcile that with the idea that reunification has been a disaster?
  15. laeuchli

    Corporate Supremacists Victorious

    I can sort of see it both ways. Suppose a friend and I started a company, which turns out to be sucessfull. Assuming we could bring ourselves to agree on a canidate we'd like to support, it seems like a pretty clear violation of the first amendment to prevent us from using our company assets to support him. After all, we are the only shareholders, all the companies assets belong to us, the government should not be able to bar us using our own assets to engage in the political process. On the other hand, if you have a large mega corporation, with the typical apathetic share holders, where the executives make contributions merely to increase thier influence or protect thier bottom line, that doesnt seem reasonable to me, and I feel like laws against this should be constitutional. Maybe I just dont know enough law, and the law which was struck down acctually distinguished between these two cases, or maybe there was a significant body of previous cases that explored this issue, and I'm just ignorant of them. Overall, I think I would have perfered that they upheld the current law, but thats just based on my feeling of what the results are likely to be, not from any kind of legal analysis. I do agree with Lessbread that money plays too large a role in our democracy, and that congress should takes steps to curb this, although I dont think thats too likely to happen. I am also rather curious as to what makes campaign limits to presidential campaigns constitutional, when this was struck down. Is it likely that this limit is going to go too?
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!