diff --git a/res/ft_shaders.farc b/res/ft_shaders.farc index 5f042e6..5db353a 100644 Binary files a/res/ft_shaders.farc and b/res/ft_shaders.farc differ diff --git a/src/DivaGL/mdl/draw_object.cpp b/src/DivaGL/mdl/draw_object.cpp index bd14eba..f376fc7 100644 --- a/src/DivaGL/mdl/draw_object.cpp +++ b/src/DivaGL/mdl/draw_object.cpp @@ -190,10 +190,10 @@ namespace mdl { rctx->obj_batch.set_transforms(mat4_identity, rctx->view_mat, rctx->proj_mat); - uniform->arr[U_BONE_MAT] = 1; + uniform->arr[U_SKINNING] = 1; gl_state_bind_vertex_array(vao); func(args); - uniform->arr[U_BONE_MAT] = 0; + uniform->arr[U_SKINNING] = 0; } else { mat4 _mat; @@ -204,7 +204,7 @@ namespace mdl { else _mat = *mat; - uniform->arr[U_BONE_MAT] = 0; + uniform->arr[U_SKINNING] = 0; gl_state_bind_vertex_array(vao); if (func != draw_sub_mesh_default || !args->instances_count) { draw_object_model_mat_load(_mat); @@ -212,7 +212,7 @@ namespace mdl { } else draw_sub_mesh_default_instanced(args, &_mat); - uniform->arr[U_BONE_MAT] = 0; + uniform->arr[U_SKINNING] = 0; } } @@ -1022,7 +1022,7 @@ static void draw_object_vertex_attrib_reset_default(const mdl::ObjSubMeshArgs* a obj_vertex_format vertex_format = mesh->vertex_format; if ((vertex_format & OBJ_VERTEX_BONE_DATA) == OBJ_VERTEX_BONE_DATA) - uniform->arr[U_BONE_MAT] = 0; + uniform->arr[U_SKINNING] = 0; if (args->morph_vertex_buffer) { uniform->arr[U_MORPH] = 0; @@ -1040,7 +1040,7 @@ static void draw_object_vertex_attrib_reset_reflect(const mdl::ObjSubMeshArgs* a obj_vertex_format vertex_format = mesh->vertex_format; if ((vertex_format & OBJ_VERTEX_BONE_DATA) == OBJ_VERTEX_BONE_DATA) - uniform->arr[U_BONE_MAT] = 0; + uniform->arr[U_SKINNING] = 0; if (args->morph_vertex_buffer) { uniform->arr[U_MORPH] = 0; @@ -1089,9 +1089,9 @@ static void draw_object_vertex_attrib_set_default(const mdl::ObjSubMeshArgs* arg } if (vertex_format & OBJ_VERTEX_BONE_DATA) - uniform->arr[U_BONE_MAT] = 1; + uniform->arr[U_SKINNING] = 1; else - uniform->arr[U_BONE_MAT] = 0; + uniform->arr[U_SKINNING] = 0; if (args->morph_vertex_buffer) { uniform->arr[U_MORPH] = 1; @@ -1134,9 +1134,9 @@ static void draw_object_vertex_attrib_set_reflect(const mdl::ObjSubMeshArgs* arg } if (vertex_format & OBJ_VERTEX_BONE_DATA) - uniform->arr[U_BONE_MAT] = 1; + uniform->arr[U_SKINNING] = 1; else - uniform->arr[U_BONE_MAT] = 0; + uniform->arr[U_SKINNING] = 0; if (args->morph_vertex_buffer) { uniform->arr[U_MORPH] = 1; diff --git a/src/DivaGL/render_manager.cpp b/src/DivaGL/render_manager.cpp index 124a6ea..b2f4f0d 100644 --- a/src/DivaGL/render_manager.cpp +++ b/src/DivaGL/render_manager.cpp @@ -282,7 +282,7 @@ namespace rndr { disp_manager->draw(mdl::OBJ_TYPE_TRANSLUCENT); draw_state->shader_index = -1; - uniform->arr[U0A] = 0; + uniform->arr[U_DEPTH] = 0; draw_pass_shadow_filter(&litproj_shadow[0], &litproj_shadow[1], 0, 1.5f, 0.01f, true); if (draw_pass_shadow_litproj()) { @@ -1156,7 +1156,7 @@ static void draw_pass_shadow_begin_make_shadowmap(Shadow* shad, int32_t index, i mat4_look_at(view_point, interest, &rctx->view_mat); draw_state->shader_index = SHADER_FT_SIL; - uniform->arr[U0A] = 0; + uniform->arr[U_DEPTH] = 0; } static void draw_pass_shadow_end_make_shadowmap(Shadow* shad, int32_t index, int32_t a3) { @@ -1357,7 +1357,7 @@ static bool draw_pass_shadow_litproj_set() { if (draw_pass_shadow_litproj_set_mat(false)) { draw_state->shader_index = SHADER_FT_SIL; - uniform->arr[U0A] = 1; + uniform->arr[U_DEPTH] = 1; return true; } else { diff --git a/src/DivaGL/shader_ft.cpp b/src/DivaGL/shader_ft.cpp index aad3237..f4cc902 100644 --- a/src/DivaGL/shader_ft.cpp +++ b/src/DivaGL/shader_ft.cpp @@ -1944,7 +1944,7 @@ static const shader_sub_table SPRITE_table[] = { static const std::pair BLINN_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TEXTURE_COUNT, false }, { U_LIGHT_0 , false }, { U_NORMAL , false }, @@ -1959,7 +1959,7 @@ static const std::pair BLINN_uniform[] = { static const std::pair ITEM_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_MORPH , true }, { U_SPECULAR_IBL , false }, { U_SPECULAR , false }, @@ -1976,7 +1976,7 @@ static const std::pair ITEM_uniform[] = { static const std::pair STAGE_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_MORPH , true }, { U_MORPH_COLOR , true }, { U_TEXTURE_COUNT, false }, @@ -1991,7 +1991,7 @@ static const std::pair STAGE_uniform[] = { static const std::pair SKIN_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_NORMAL , false }, { U_SELF_SHADOW , false }, { U_FOG , false }, @@ -2004,7 +2004,7 @@ static const std::pair SKIN_uniform[] = { static const std::pair SSS_SKIN_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U37 , false }, { U_ALPHA_TEST , true }, { U_SELF_SHADOW , false }, @@ -2021,7 +2021,7 @@ static const std::pair SSS_FILT_uniform[] = { static const std::pair HAIR_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_SPECULAR_IBL , false }, { U_SPECULAR , false }, { U_NORMAL , false }, @@ -2039,7 +2039,7 @@ static const std::pair HAIR_uniform[] = { static const std::pair CLOTH_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_SPECULAR_IBL , false }, { U_SPECULAR , false }, { U_NORMAL , false }, @@ -2057,7 +2057,7 @@ static const std::pair CLOTH_uniform[] = { static const std::pair TIGHTS_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_SPECULAR , false }, { U_ENV_MAP , false }, { U_SELF_SHADOW , false }, @@ -2080,19 +2080,19 @@ static const std::pair SKY_uniform[] = { }; /*static const std::pair EYEBALL_uniform[] = { - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_ENV_MAP , false }, };*/ /*static const std::pair EYELENS_uniform[] = { - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_SPECULAR , false }, { U_ENV_MAP , false }, };*/ static const std::pair GLASEYE_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_SELF_SHADOW , false }, { U_FOG , false }, { U18 , false }, @@ -2102,13 +2102,13 @@ static const std::pair GLASEYE_uniform[] = { }; /*static const std::pair MEMBRAN_uniform[] = { - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_NORMAL , false }, { U_MEMBRANE , false }, };*/ /*static const std::pair SHDMAP_uniform[] = { - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TEXTURE_COUNT, false }, { U_TRANSPARENCY , false }, { U_LIGHT_1 , false }, @@ -2117,7 +2117,7 @@ static const std::pair GLASEYE_uniform[] = { /*static const std::pair ESM_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TEXTURE_COUNT, false }, { U_TRANSPARENCY , false }, };*/ @@ -2132,7 +2132,7 @@ static const std::pair ESMFILT_uniform[] = { static const std::pair LITPROJ_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_SPECULAR , false }, { U_NORMAL , false }, { U_TEXTURE_COUNT, false }, @@ -2142,7 +2142,7 @@ static const std::pair LITPROJ_uniform[] = { static const std::pair SIMPLE_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TEXTURE_COUNT, false }, //{ U_NORMAL , false }, // 3rd removed //{ U_INSTANCE , false }, // 4th removed @@ -2151,18 +2151,18 @@ static const std::pair SIMPLE_uniform[] = { static const std::pair SIL_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TRANSPARENCY , false }, { U_TEXTURE_COUNT, false }, { U_MORPH , true }, { U_MORPH_COLOR , true }, - { U0A , false }, + { U_DEPTH , true }, { U_ALPHA_TEST , true }, // 7th added }; static const std::pair LAMBERT_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TEXTURE_COUNT, false }, { U_LIGHT_0 , false }, { U_FOG_HEIGHT , false }, @@ -2174,7 +2174,7 @@ static const std::pair LAMBERT_uniform[] = { static const std::pair CONSTANT_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TEXTURE_COUNT, false }, { U_FOG_HEIGHT , false }, { U_MORPH , true }, @@ -2184,7 +2184,7 @@ static const std::pair CONSTANT_uniform[] = { /*static const std::pair PEEL_uniform[] = { { U_DEPTH_PEEL , false }, - { U_BONE_MAT , true }, + { U_SKINNING , true }, };*/ static const std::pair TONEMAP_uniform[] = { @@ -2319,7 +2319,7 @@ static const std::pair PUDDLE_uniform[] = { static const std::pair S_REFL_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_REFLECT , true }, { U_MORPH , true }, { U_MORPH_COLOR , true }, @@ -2331,7 +2331,7 @@ static const std::pair S_REFL_uniform[] = { }; static const std::pair S_REFR_uniform[] = { - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_TRANSPARENCY , false }, }; @@ -2374,7 +2374,7 @@ static const std::pair GLITTER_PT_uniform[] = { /*static const std::pair SHOW_VEC_uniform[] = { //{ U16 , true }, // 0th removed - { U_BONE_MAT , true }, + { U_SKINNING , true }, { U_SHOW_VECTOR , false }, };*/ diff --git a/src/DivaGL/uniform.hpp b/src/DivaGL/uniform.hpp index 93d6bbe..1f47b90 100644 --- a/src/DivaGL/uniform.hpp +++ b/src/DivaGL/uniform.hpp @@ -18,7 +18,7 @@ enum uniform_name { U_CLIP_PLANE = 0x07, U08 = 0x08, U_DEPTH_PEEL = 0x09, - U0A = 0x0A, + U_DEPTH = 0x0A, U0B = 0x0B, U_ALPHA_BLEND = 0x0C, U_RIPPLE_EMIT = 0x0D, @@ -56,7 +56,7 @@ enum uniform_name { U2D = 0x2D, U2E = 0x2E, U_SHOW_VECTOR = 0x2F, - U_BONE_MAT = 0x30, + U_SKINNING = 0x30, U_SNOW_PARTICLE = 0x31, U_SPECULAR_IBL = 0x32, U_COMBINER = 0x33,