optimize graphics performance

This commit is contained in:
Eduardo Bart
2012-04-08 16:28:03 -03:00
parent c93732a44a
commit 92bd1aba54
14 changed files with 121 additions and 83 deletions

View File

@@ -1,11 +1,11 @@
uniform float opacity; // painter opacity
uniform vec4 color; // painter color
uniform float time; // time in seconds since shader linkage
uniform sampler2D texture; // map texture
uniform sampler2D tex0; // map texture
varying vec2 texCoord; // map texture coords
//uniform int itemId; // item id
varying vec2 textureCoords; // map texture coords
void main()
{
gl_FragColor = texture2D(texture, textureCoords);
gl_FragColor = texture2D(tex0, texCoord);
}

View File

@@ -1,13 +1,13 @@
uniform float opacity; // painter opacity
uniform vec4 color; // painter color
uniform float time; // time in seconds since shader linkage
uniform sampler2D texture; // map texture
varying vec2 textureCoords; // map texture coords
uniform sampler2D tex0; // map texture
varying vec2 texCoord; // map texture coords
//uniform vec4 awareArea;
void main()
{
gl_FragColor = texture2D(texture, textureCoords);
gl_FragColor = texture2D(tex0, texCoord);
}
/*

View File

@@ -2,9 +2,9 @@ uniform float opacity; // painter opacity
uniform vec4 color; // painter color
uniform float time; // time in seconds since shader linkage
uniform sampler2D texture; // outfit texture
varying vec2 textureCoords; // outfit texture coords
uniform sampler2D maskTexture; // outfit color mask
uniform sampler2D tex0; // outfit texture
uniform sampler2D tex1; // outfit color mask
varying vec2 texCoord; // outfit texture coords
uniform vec4 headColor;
uniform vec4 bodyColor;
@@ -14,8 +14,8 @@ uniform vec4 feetColor;
vec4 calcOutfitPixel()
{
vec4 pixel = texture2D(texture, textureCoords);
vec4 maskColor = texture2D(maskTexture, textureCoords);
vec4 pixel = texture2D(tex0, texCoord);
vec4 maskColor = texture2D(tex1, texCoord);
vec4 outColor = vec4(1.0, 1.0, 1.0, 1.0);
if(maskColor.r > 0.1 && maskColor.g > 0.1)