diff options
Diffstat (limited to 'drivers/gles2/shaders')
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 4 | ||||
-rw-r--r-- | drivers/gles2/shaders/stdlib.glsl | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 3e64c92e96..b945e696b1 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -168,7 +168,7 @@ void main() { #ifdef USE_SKELETON - highp mat4 bone_transform = mat4(1.0); + highp mat4 bone_transform = mat4(0.0); #ifdef USE_SKELETON_SOFTWARE // passing the transform as attributes @@ -189,7 +189,7 @@ void main() { texel2DFetch(bone_transforms, skeleton_texture_size, tex_ofs + ivec2(1, 0)), texel2DFetch(bone_transforms, skeleton_texture_size, tex_ofs + ivec2(2, 0)), vec4(0.0, 0.0, 0.0, 1.0)); - + bone_transform += transpose(b) * bone_weights[i]; } } diff --git a/drivers/gles2/shaders/stdlib.glsl b/drivers/gles2/shaders/stdlib.glsl index ebbdb96311..8b30e097e6 100644 --- a/drivers/gles2/shaders/stdlib.glsl +++ b/drivers/gles2/shaders/stdlib.glsl @@ -38,8 +38,5 @@ highp vec4 texel2DFetch(highp sampler2D tex, ivec2 size, ivec2 coord) float x_coord = float(2 * coord.x + 1) / float(size.x * 2); float y_coord = float(2 * coord.y + 1) / float(size.y * 2); - x_coord = float(coord.x) / float(size.x); - y_coord = float(coord.y) / float(size.y); - return texture2DLod(tex, vec2(x_coord, y_coord), 0.0); } |