• 0

    posted a message on HD texture fix [Feb22: 1.3 support, fixed compass]
    I noticed that the really high res texture packs have kind of a weird look to them. I was playing with texturing in a small opengl program I wrote and I noticed that with 256x256 textures, they looked dramatically better if I called gluBuild2DMipmaps when creating texture objects.

    I noticed that this page says to never use that function:
    http://www.opengl.org/wiki/Common_Mista ... d2DMipmaps

    This post explains the pros/cons to gluBuild2DMipmaps vs. the newer stuff. Since minecraft uses power of 2 textures and no shader stuff, I think that gluBuild2DMipmaps would be fine:
    http://www.gamedev.net/topic/452780-gl_ ... 2dmipmaps/

    If you do use gluBuild2Mipmaps, it's pretty easy and you can find documentation for it here:
    http://graphics.stanford.edu/courses/cs ... ample.html

    It looks like this:
       // Create texture for cube; load marble texture from file and bind it
       pTextureImage = read_texture("marble.rgb", &width, &height, &nComponents);
       glBindTexture(GL_TEXTURE_2D, TEXTURE_ID_CUBE);
       gluBuild2DMipmaps(GL_TEXTURE_2D,     // texture to specify
                         GL_RGBA,           // internal texture storage format
                         width,             // texture width
                         height,            // texture height
                         GL_RGBA,           // pixel format
                         GL_UNSIGNED_BYTE,	// color component format
                         pTextureImage);    // pointer to texture image
       glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
       glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
                        GL_LINEAR_MIPMAP_LINEAR);


    Just look at the InitGraphics function.

    If you want to follow the advice of that "common mistakes" wiki, there are examples of the other stuff:

    http://www.opengl.org/sdk/docs/man3/xht ... Mipmap.xml
    http://www.khronos.org/opengles/sdk/1.1 ... ameter.xml

    Is there any chance this modification could be made to minecraft when using the HD texture patcher? I think it would dramatically improve the really high-end HD texture packs.

    Thanks for making this mod!
    Posted in: Resource Packs
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    This mod is really nice. I wonder what it would take to get Notch to bundle this mod with the official game? Like was done with the better light mod.

    I've started playing with a variant of the dungeon finder shader and I've noticed that if you set it to find some block type, say iron ore "mc_Entity.x == 15.0", that it doesn't always highlight them. It seems like any face that would not be visible to you if you were next to it, is not processed in the shader. My vague understanding of vertex shaders tells me the reason is because minecraft is doing some smart tessellation where non-visible faces are manually culled in the java code so that no glVertex function call is made for them. I assume this was done for performance reasons if that's the case.

    Does that make sense? It's been a while since I fiddled with opengl so I could be wrong about some of how it works. Anyone with minecraft modding experience able to make it so that I can disable this culling on a per-block id basis? My computer isn't currently setup for minecraft modding. Perhaps I should bite the bullet and install netbeans and the other necessary tools (I don't normally program in Java, more of a Haskell/C guy).

    Anyway, this mod has given me a fun way to explore shaders in a way that I haven't before.

    This is my favorite mod by leaps and bounds :smile.gif:
    Posted in: Minecraft Mods
  • To post a comment, please .