Jump to content
  • Advertisement

stalef

Member
  • Content Count

    88
  • Joined

  • Last visited

Community Reputation

607 Good

About stalef

  • Rank
    Member
  1. stalef

    Clipping on a wavy surface

    If you can sample the water height in the reflection pass fragment shader (easy if you are using a heightmap for the surface) you can discard the fragment if it is below water.
  2. stalef

    Cascaded Shadow Maps Look Bad

    What about the range of your cascades? You write you are using {0.001,10},{0.001,50} and {0.001,100}. They all start at 0.001. You should have some overlap, but currently they all start at the same distance. This is not needed, and you will also get z-buffer precission problems / z-fighting.
  3. stalef

    Ocean Wave 'Fake' SSS

    This is done in the NVidia Island demo. The demo/sample is in the DirectX11 SDK. Shader code is available. Might be more info in shader comments or whitepaper.   YouTube video:
  4. stalef

    Jittering near a landscape.

    Floats have better precision on small values. One solution is to divide your terrain into tiles, and center vertices for each tile to 0. Each tile have their own coordinate frame and will require separate model matrices. When the camera is close to a tile, the vertices in camera space will have small values and precision should be acceptable. At greater camera distance the precision will get worse, but less noticeable. The trick then is to do all matrix calculations with doubles, and only convert to single precision in the end. Do not send model and view matrices as two separate matrices to the shader and multiply in the shader. Calculate model-view matrix using double precision on the CPU, then upload final matrix to shader as single precision.
  5. Instead of using vertex colors, a fragment shader can easily calculate azimuth/zenith angle of each pixel, and based on those angles you could use math or texture sampling to get the color you want.   By doing this stuff in the fragment shader, the acutal geometry of the skydome/box in not very important as long as the geometry you do use will cover the parts of the screen the sky is covering.
  6. but I want to ask is there any other more simple (just using matrices without swapping y and z vertices) way to load scene correctly?   A rotation matrix that rotates 90 degrees on the x-axis will flip y/z coordinates.
  7. stalef

    Advanced terrain rendering

    Dice have made some good stuff: http://publications.dice.se/attachments/Chapter5-Andersson-Terrain_Rendering_in_Frostbite.pdf http://publications.dice.se/publications.asp?show_category=yes&which_category=Rendering
  8. This site helped me alot when I also wanted to do more modern OpenGL: http://nopper.tv/opengl.html
  9. http://glprogramming.com/red/appendixf.html (Bottom of page)
  10. stalef

    Texture Atlas seam issue.

    Have you concidered using a texture array instead?
  11. stalef

    HDR: practical use in a game

    Also make sure you compensate for gamma, and do your light calculations in linear space.
  12. You can not do it like you have in your example. You need to set up an FBO with multiple render targets, and bind your editedMap as one of the targets.
  13. stalef

    gravitation question

    Quote:Original post by Echkard g = G(m1)(m2) / r^2 I think your divide by r^2 is not the radius of the planet, but the distance between them. So, if you double the distance, the gravitational pull should be divided by four.
  14. stalef

    gravitation question

    If you double the radius if a sphere, the volume (and the mass) should be multiplied by 8... (Volume of a sphere is (4/3) * PI * r^3 )
  15. stalef

    projection transformation

    How about interpolating in clip-space?
  • 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!