Results 1 to 5 of 5

Thread: Strange gap in skybox

  1. #1

    Strange gap in skybox

    I've got a skybox consisting of 6 GL_QUADS.

    The quads are arranged in a cube, so the distance is all the same. The texture coordinates are (0,0), (0,1), (1,1), (1,0). Even so there is some kind of gap between the seperate quads. glTexParameteri(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE); did not help anything, neither WRAP_T or both.

    You can see it on the screenshot.

  2. #2
    [size=10px]"In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite." -- Paul Dirac[/size]

  3. #3

    Strange gap in skybox

    Well, my actual problem was the clamp-thing: First I called glTexParameteri with the wrong parameters. Second I have to call glTexParameteri before sending the texture to the graphics card.

  4. #4

    Strange gap in skybox

    Check your texture sizes. Some video cards demand power of 2 sizes e.g 512x512.
    Once i had these gaps too. I found out that my textures were 511x511. The graphics hardware fills the last pixels with zero-data.
    I changed the background color (used for clearing the color buffer) and i found out that the gaps had that color too; They were transparent (alpha = 0).

    Offcourse i'm using D3D, but i still hope this can an answer to your question.

    [offtopic]

    What sizes do you use for your skybox textures??
    I want to experiment with skyboxes too, and yours looks great so i'm curious about the texture sizes.

    [/offtopic]
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5

    Strange gap in skybox

    Alright, I should have expressed myself a little more clearly: I solved the problem by switching on the clamping and rendering the quads "overlapped".

    My textures were 512*512, so they match the criterion of 2^n*2^m. Textures whose measurements are not powers of two are not displayed anyhow, just like I didn't bind them.

    And they are 512*512, generated with Terragen, TGA format. The real problem is the size, even compressed they have a size of ~1.2 MB together.

    EDIT: I'd suggest NOT to render the landscape as I did. These mountains look good, but they are a little blurry and they disturb the fogging-effect.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •