Jump to content
Lethal Raptor Games

3.1 doesn't convert textures correctly

Recommended Posts

I'm not sure what I'm looking for here, but the sample textures are using mipmapping...this will cause the converter to resize the image to the closest power-of-two dimensions, which will cause the results to look different. When I disabled mipmapping the converted image looks identical to the original.

post-1-0-69479700-1397496155_thumb.png

Share this post


Link to post

If you open the shader "Shaders/Drawing/drawimage.shader" and replace the vertex source with this, you may see a small improvement in image quality:

#version 400

uniform mat4 projectionmatrix;
uniform mat4 drawmatrix;
uniform vec2 offset;
uniform vec2 position[4];
uniform vec2 texcoords[4];
// ADD THIS: --------------------------------
uniform vec2 buffersize;
//--------------------------------------------------

in vec3 vertex_position;
in vec2 vertex_texcoords0;

out vec2 vTexCoords0;

void main(void)
{
gl_Position = projectionmatrix * (drawmatrix * vec4(position[gl_VertexID]+offset, 0.0, 1.0));

// AND THIS ------------------------
gl_Position += vec4(0.5/buffersize.x,0.5/buffersize.y,0.0,0.0);
//-----------------------------------------

vTexCoords0 = texcoords[gl_VertexID];
}

Share this post


Link to post

I think it's safe for me to go ahead and include this since it is a tiny change most people won't notice.

 

Share this post


Link to post

Note the shader above will cause the terrain editor to not work correctly.

Share this post


Link to post
Guest
This topic is now closed to further replies.
×
×
  • Create New...