Thread: [731] Animated textures quality

Results 1 to 3 of 3
  1. #1 [731] Animated textures quality 
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,789
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Anybody knows what could be causing my textures to render so poorly? I'm using lwjgl which renders with openGl:

    (Expected):

    Attached image

    or

    Attached image

    (Currently):

    Attached image

    Some code:

    Code:
            int glTexture = GL11.glGenTextures();
            GL11.glBindTexture(GL11.GL_TEXTURE_2D, glTexture);
     
            GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, repeatS ? GL11.GL_REPEAT : GL12.GL_CLAMP_TO_EDGE);
            GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, repeatT ? GL11.GL_REPEAT : GL12.GL_CLAMP_TO_EDGE);
     
            GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width, height, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer);
     
            GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); // Linear Filtering
            GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); // Linear Filtering
    Project thread
    Reply With Quote  
     

  2. #2  
    Finland

    Zoltus's Avatar
    Join Date
    Dec 2015
    Age
    24
    Posts
    977
    Thanks given
    671
    Thanks received
    779
    Rep Power
    5000
    Bloom?
    edit nvm
    thought first image was expected second yours.
    Attached image

    Spoiler for God:
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member GameMaster's Avatar
    Join Date
    Jun 2015
    Posts
    152
    Thanks given
    46
    Thanks received
    18
    Rep Power
    45
    Blend your textures. Draw your first quad with the texture enabled, then draw another quad with blending enabled with blending colors. However, your second one will need to be directed oh-so slightly in position from the camera. Something along the lines of:
    Code:
    GL11.glVertex3f(-1.0f, -1.0f, 0.99f);
    That's the simplest way to do it, but there are better solutions; such as using a zBuffer.
    Attached image
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Animated Texture
    By Brian 2x in forum Snippets
    Replies: 14
    Last Post: 03-06-2017, 10:15 PM
  2. Dollar a Banner [Animated] [High-Quality] [$1]
    By Velarin in forum Requests
    Replies: 2
    Last Post: 12-27-2011, 09:06 PM
  3. 508 Stand animation and textures
    By `Xodian in forum Requests
    Replies: 4
    Last Post: 08-24-2011, 12:22 PM
  4. 508 Stand animation and textures
    By `Xodian in forum Requests
    Replies: 1
    Last Post: 08-20-2011, 04:46 PM
  5. Animated Textures
    By Minigame in forum RS2 Client
    Replies: 3
    Last Post: 03-08-2008, 09:39 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •