From 01632a824ee7e2326aa90b32d75c2fe09f61a37e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 29 Jun 2014 22:41:02 -0300 Subject: Bug Fixes -=-=-=-=- -Documentation now shows overridable theme values (though this needs to be documented). -Detect when object transform is flipped and flip normals too. -TileMap can specify bounce and friction for collision. -Removed limit of 4 lights per object -Added is_hovered() to buttons. --- drivers/gles2/shaders/material.glsl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gles2/shaders') diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index 602620a04b..b667e9176c 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -31,6 +31,8 @@ attribute vec4 color_attrib; // attrib:3 attribute vec2 uv_attrib; // attrib:4 attribute vec2 uv2_attrib; // attrib:5 +uniform float normal_mult; + #ifdef USE_SKELETON attribute vec4 bone_indices; // attrib:6 attribute vec4 bone_weights; // attrib:7 @@ -232,8 +234,10 @@ void main() { #endif highp vec4 vertex_in = vertex_attrib; // vec4(vertex_attrib.xyz * data_attrib.x,1.0); vec3 normal_in = normal_attrib; + normal_in*=normal_mult; #if defined(ENABLE_TANGENT_INTERP) vec3 tangent_in = tangent_attrib.xyz; + tangent_in*=normal_mult; #endif #ifdef USE_SKELETON -- cgit v1.2.3