diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-10-14 19:44:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-10-14 19:44:41 -0300 |
commit | cd218b8c09482f9f9f2d15285d55ad955673697f (patch) | |
tree | 60a09595de85ac63027b916dc2344b6612975bf1 /drivers | |
parent | 94e35ef316caa0f713eef1c3823c8fa035508090 (diff) |
Fixes
-=-=-
-Fixed normalmap depth parameter
-Fixes to DirAccess on Windows
-Double click on resource dock will open them
-Fixes to doc generator (should make github wiki on class list more up to date)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/shader_compiler_gles2.cpp | 1 | ||||
-rw-r--r-- | drivers/gles2/shaders/material.glsl | 5 | ||||
-rw-r--r-- | drivers/windows/dir_access_windows.cpp | 12 |
3 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 5457a869af..50b63e1aa0 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -678,6 +678,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { mode_replace_table[1]["TANGENT"]="tangent"; mode_replace_table[1]["BINORMAL"]="binormal"; mode_replace_table[1]["NORMALMAP"]="normalmap"; + mode_replace_table[1]["NORMALMAP_DEPTH"]="normaldepth"; mode_replace_table[1]["VAR1"]="var1_interp"; mode_replace_table[1]["VAR2"]="var2_interp"; mode_replace_table[1]["UV"]="uv"; diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index 870004fd10..44337e1197 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -824,6 +824,8 @@ void main() { vec3 normalmap = vec3(0.0); #endif + float normaldepth=1.0; + #if defined(ENABLE_DISCARD) @@ -839,7 +841,8 @@ FRAGMENT_SHADER_CODE #if defined(ENABLE_NORMALMAP) - normal = normalize( tangent_interp * normalmap.x + binormal_interp * normalmap.y + normal_interp * normalmap.z ) * side; + normal = normalize( mix(normal_interp,tangent_interp * normalmap.x + binormal_interp * normalmap.y + normal_interp * normalmap.z,normaldepth) ) * side; + #endif #if defined(ENABLE_DISCARD) diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index aefec59ce0..df6cc6c5e2 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -189,10 +189,10 @@ Error DirAccessWindows::change_dir(String p_dir) { current_dir=real_current_dir_name; // TODO, utf8 parser current_dir=current_dir.replace("\\","/"); - } else { + } //else { SetCurrentDirectoryW(prev_dir.c_str()); - } + //} return worked?OK:ERR_INVALID_PARAMETER; } else { @@ -210,10 +210,10 @@ Error DirAccessWindows::change_dir(String p_dir) { current_dir=real_current_dir_name; // TODO, utf8 parser current_dir=current_dir.replace("\\","/"); - } else { + }// else { SetCurrentDirectoryA(prev_dir.ascii().get_data()); - } + //} return worked?OK:ERR_INVALID_PARAMETER; @@ -352,7 +352,7 @@ bool DirAccessWindows::dir_exists(String p_dir) { DWORD fileAttr; fileAttr = GetFileAttributesExW(p_dir.c_str(), GetFileExInfoStandard, &fileInfo); - if (0xFFFFFFFF == fileAttr) + if (0 == fileAttr) return false; return (fileAttr&FILE_ATTRIBUTE_DIRECTORY); @@ -361,7 +361,7 @@ bool DirAccessWindows::dir_exists(String p_dir) { DWORD fileAttr; fileAttr = GetFileAttributesExA(p_dir.ascii().get_data(), GetFileExInfoStandard, &fileInfo); - if (0xFFFFFFFF == fileAttr) + if (0 == fileAttr) return false; return (fileAttr&FILE_ATTRIBUTE_DIRECTORY); |