1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Fix Bugs w/ Octahedral Compression Implementation

Initial octahedral compression incorrectly wrote tangent to the buffer
using an offset of 3 rather than 4, losing the sign of the tangent
vector needed for things like tangent space for texturing mapping

GLES3 renderer used remove_custom_define rather than set_conditional to
change back to the default conditional state the scene shader should be
in
This commit is contained in:
Omar El Sheikh
2021-08-04 18:55:49 -04:00
parent 63047093c9
commit 6c643af6a7
2 changed files with 9 additions and 9 deletions

View File

@@ -2154,7 +2154,7 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
glBindVertexArray(0);
state.scene_shader.remove_custom_define("#define ENABLE_OCTAHEDRAL_COMPRESSION\n");
state.scene_shader.set_conditional(SceneShaderGLES3::ENABLE_OCTAHEDRAL_COMPRESSION, false);
state.scene_shader.set_conditional(SceneShaderGLES3::USE_INSTANCING, false);
state.scene_shader.set_conditional(SceneShaderGLES3::USE_SKELETON, false);
state.scene_shader.set_conditional(SceneShaderGLES3::USE_RADIANCE_MAP, false);