Jump to content
  • Advertisement

Coderebel

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

108 Neutral

About Coderebel

  • Rank
    Newbie

Personal Information

  • Interests
    Programming
  1. Hey, thanks for your answer JoeJ! I think I get the basic idea - I agree, there is no need for the indirection texture if you can already manipulate vertex UV coords at load-time(even better, one lookup less in PS). I'll try to implement it later on today, will let you know if I succeed Thanks a lot!
  2. Hey guys! In my 3D terrain generator, I calculate simple texture coordinates based on x,z (y being up down) coordinates as if terrain was flat - simple planar projection. That of course introduces texture stretching on sloped parts of the terrain. Trying to solve that I first implemented tri-planar mapping (like this), but it is really performance(PS) heavy and the results are very weird looking in some cases. Then I found another technique, which looks better, and most importantly, the heavy work is done in a preprocess - generating an indirection map of terrain which is then used in pixel shader to offset uv coords: Indirection mapping for on quasi-conformal relief texturing Has anyone ever implemented this solution and is willing to share some code for indirection map generation (spring grid relaxation)? I couldnt find any implementation or sample, and am really not sure how to go about it. Thanks!
  3. Coderebel

    Shadow map surface aspect ratio ?

    I am still a bit confused   I fully understand that sm texel to pixel relationship is never 1:1, but still, if sm ratio differs from screen size ratio, sm texel would be scaled more in one direction than other when projecting to screen, producing less acurate shadows. Or am I wrong?? I did a test of both versions, and some shadow details look more correct to me when sm ratio matches screen ratio.   In terms of performance and compatibility: suppose the quality of final result is about the same if my sm size is 2048x2048 and 2048x1500 (I am making up the numbers). Which one would be better to use(taking into account my gaussian blur pass on sm)? I am targeting gpu's that support at least SM3.   Thanks to all of you!
  4. Coderebel

    Shadow map surface aspect ratio ?

    Hey, thanks for your answer.   So if i get it right: Let's say my screen res is 1024x768. If I create a sm of size 1024x768, there would be a minor accuracy gain, and a minor performance gain on gpus that support non power of two sizes and no performance gain on gpus that dont support non power of 2 sizes over a 1024x1024 sm ?   The size of sm is important for me to be as small as possible not only because the memory and bandwidth, but also because I am doing a 5x5 gaussian blur prefilter on shadow map, and since I am fragment shader bound, that does affect final performance.   Thanx!
  5. Hey there guys!   I've been fooling around with shadow mapping for quite some time, I've experimented a lot, implemented pcf, vsm, esm filtering, and got it working well now. However, one question still haunts me, and I havent been able to find a satisfying answer or discussion about it. Aspect ratio of the shadow map rendering surface.   I am talking about a simple scenario, one directional light, one shadow map for entire scene. I construct my orthogonal lightview projection matrix by creating a box to fit around my viewing frustum (as I believe is the standard approach). So obviously, the aspect ratio of the lightview projection matrix is the same as the one of my view matrix, which depends on screen resolution and is never 1:1 (16:9...etc...). So I believe, the shadows are more accurate if the aspect ratio of my offscreen shadowmap rendering surface would be like that, the same as screen aspect ratio ??? Please correct me if I am wrong??    Nonetheless, in vast majority of the samples and tutorials, the shadowmap size used is fixed, 1024x1024 for example, and not dependent on the frame buffer resolution at all. The interesting thing is that not in a single resource (and I checked MANY) there was not even a word about that, either used fixed square size, or the size of frame buffer. Furthermore, I checked how it is with some AAA games, and realised they were all using fixed square shadow map sizes, with quality settings either size of 1024^, 2048^ or 4096^, which seem like giant leaps to me... Would it not make more sense to have the size of shadow map for normal quality for example the same as frame buffer resolution, the lower quiality size*0.5 and higher quality size*1.5 ???   Are such sizes of shadow maps used only to be compatible with older hardware that doesnt support arbitrary rendering surface sizes? Or am I missing something really obvious here ??   I hope anyone can shead some light on this matter for me!!!   Thanks a lot!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!