• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

586 Good

About cwhite

  • Rank
    Advanced Member
  1. Try running your program through a memory profiler like valgrind. You also might want to try a debug allocator, possibly something like duma (http://duma.sourceforge.net/). You should also configure your system to write core files on the crashes. Doing these things will make it a lot easier to track down the memory corruption issue. *Edit* I also thought I'd add that in the past, I've seen unpredictable segfaults in glDrawElements when the parameters are wrong or if the opengl state is not set up properly before making the call.
  2. Play My MMO

    crashes every time I run it.
  3. Because if you don't have high resolution crotches, the crotch laser won't look right when you hook the weapon slot up to (0,0,0)
  4. Do you believe in god?

    Quote:Original post by agi_shi Quote:Original post by nilkn Many different topics have been discussed in these 85 pages, some of them barely related to question of whether God exists (for example, the evolution of color vision). Also, many questions and topics keep getting repeated, mainly because they don't get an adequate response the first time. Frankly, this thread is just one massive amalgam of tangentially related topics all sown together by the tenuous thread of whether God exists. Oh... in that case... What is the answer to life, the universe, and everything? And don't link to the Google calc. =D 42 DUH
  5. water normals

    since your water surface is procedural, why not just differentiate the function to find the binormal and tangent, then cross them together to find the normal? That way, you'll have the exact normal, instead of the average of the normals of the triangles approximating a continuous surface. Also, this will be 100 times easier and 10 times faster in a vertex shader. Just bite the bullet and don't do this on the CPU.
  6. Quote:Original post by quasty @dodecahedron: I will test this filter in C over the holidays. But although I havn't really understood it yet, I don't believe this can be very well done on a GPU with so much looping, texture fetches (and passes?), can't it? thank you very much! I beg to differ. I recently implemented nonlinear diffusion in GLSL as part of a GPGPU app I was working on. On a GeForce 7800, it ran 300x faster than on an Intel Pentium D clocked at 3.2 GHz. The trick is to overlap the texture fetches because they are independent of each other.
  7. GPU slower then CPU?

    Quote:Original post by Kamil cwhite: Abnormal to cpu to do it slower? I thought that GPU do vector based arithmetics faster then CPU and equation such as pos = startPos * time + acc * time^2 * 0.5 where pos, startPos and acc are vectors, should be faster on GPU. My bad, I wrote that on little sleep. I meant it would be abnormal for the GPU to do it slower.
  8. Photon mapping

    If you plan on using the photon map for indirect or direct lighting, then you should also look into the "final gather" operation, which is computationally expensive (instead of querrying the photon map at that point, it shoots out hundreds of rays over the hemisphere and querries the photon map at those points). This prevents direct visualization of the error associated with the photon map, and generally produces decent results for indirect illumination, though I'm a bit too rusty to remember if it also produces good results for direct illumination.
  9. GPU slower then CPU?

    In general, it would be abnormal for the CPU to do this task slower than the GPU, but there are so many complex factors that go into program optimization that it is impossible for anybody to know what's going on without looking at your entire source code and knowing something about your system setup. We know you have a 6600 GT, but we still don't know anything about your CPU. Given that the 6600 is an older card, you might be vertex bound, but you can't really tell without profiling. Get a good profiler, or at least use some sort of timing mechanism to get some good data about your workload, and you'll probably figure out what's going on.
  10. I've seen a number of diffuse surfaces benefit from normal mapping or parallax mapping. The techniques are suited just fine for diffuse surfaces. However, because specular surfaces usually exhibit high frequency reflectance content, you probably notice the effects of normal mapping more.
  11. You also might consider moving branches up the pipeline. You mentioned that your shader is computing view dependent effects. You could implement a deferred shading scheme where instead of writing colors to the framebuffer, you write several parameters for each pixel to one of several textures. Then, for the final pass, you draw a screen aligned quad and shade it using your final shader that takes as input the parameters that were stored in textures from the earlier rendering pass. So what does this have to do with branching? Well, you can write several shaders, one for each control flow condition. Then, you tile several quads across the screen, with different quads corresponding to the different regions where you wanted a certain control flow path to occur. This way, you can change control flow by changing shaders, which moves the branch up the pipeline, so to speak. This isn't always going to be a good or graceful solution, but if you're having lots of performance problems caused by branching, this is a way to prevent pixels from taking a bunch of different control flow paths that they don't need to take.
  12. Current hardware doesn't allow you to do that. For the min problem specifically, you can do this by writing a fragment program that samples 4 nearby pixels in the input texture and then writes the minimum of those 4 pixels into the output texture. You then downsize the texture until you only have one pixel left, which should be the minimum value if you did it properly.
  13. The rendering equation (the equation that determines how light interacts with matter) is an integro-differential equation. In the general case, it has no analytic solution, so off-line photo-realistic renderers solve it numerically using a probabalistic technique called Monte-Carlo integration. Realtime renderers often work with a highly simplified form of the rendering equation. The simplest lighting model is the Phong lighting model, which requires nothing more than simple linear algebra to compute. However, it doesn't produce very realistic results There are also lots of hybrid techniques that try to approximate the rendering equation in real-time by projecting the lighting function and the reflectance function onto orthonormal basis functions to reduce the computational demands of solving the full rendering equation with Monte-Carlo integration. I would say you need a strong background in all of the following fields of mathematics to really understand computer graphics: Linear algebra Algebra Calculus Differential Equations Probability Information Theory/Signal Processing Trigonometry Quote: but I'd just like to know the baseline knowledge needed, like what guys like Carmack or Sweeney were given (since they had to figure everything graphics-wise out themselves). Sweeney and Carmack didn't figure out any of the theory that underlies computer graphics. Sometimes you'll hear Carmack try to take credit for ideas that weren't his (e.g. certain parts of a stencil shadow algorithm), but the only thing he really deserves credit for is the non-trivial system-building endeavor of taking a lot of already known algorithms and implementing them efficiently and bringing them together into a single engine. Computer graphics is a very large field, and Carmack/Sweeney can hardly be considered on the cutting edge of anything other than system building.
  14. water waves in HLSL

    I've also found that "stretching out" your reflection/refraction textures can help eliminate artifacts around the edges. By stretching them out, I mean have your texture coordinates run from [0.05, 0.95] instead of [0,1]. That way, when you distort the texture, you won't distort to outside of [0,1]. This, of course, is only one way that you can avoid that artifact.
  15. Critique this......

    Quote:Original post by Natrone19 2. I have been spell checking my information before posting. I am sorry if I may have missed a word or typed to fast and spelled it wrong. Grammar check is important too.
  • Advertisement