Renamed some uniforms

This commit is contained in:
korenkonder
2024-02-23 11:33:38 +03:00
parent 4df6e70a4a
commit f78376d06c
5 changed files with 39 additions and 39 deletions
Binary file not shown.
+10 -10
View File
@@ -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;
+3 -3
View File
@@ -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 {
+24 -24
View File
@@ -1944,7 +1944,7 @@ static const shader_sub_table SPRITE_table[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> BLINN_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> ITEM_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> STAGE_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> SKIN_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> SSS_FILT_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> HAIR_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> CLOTH_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> SKY_uniform[] = {
};
/*static const std::pair<uniform_name, bool> EYEBALL_uniform[] = {
{ U_BONE_MAT , true },
{ U_SKINNING , true },
{ U_ENV_MAP , false },
};*/
/*static const std::pair<uniform_name, bool> EYELENS_uniform[] = {
{ U_BONE_MAT , true },
{ U_SKINNING , true },
{ U_SPECULAR , false },
{ U_ENV_MAP , false },
};*/
static const std::pair<uniform_name, bool> 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<uniform_name, bool> GLASEYE_uniform[] = {
};
/*static const std::pair<uniform_name, bool> MEMBRAN_uniform[] = {
{ U_BONE_MAT , true },
{ U_SKINNING , true },
{ U_NORMAL , false },
{ U_MEMBRANE , false },
};*/
/*static const std::pair<uniform_name, bool> 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<uniform_name, bool> GLASEYE_uniform[] = {
/*static const std::pair<uniform_name, bool> 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<uniform_name, bool> ESMFILT_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> LITPROJ_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> SIMPLE_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> 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<uniform_name, bool> LAMBERT_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> CONSTANT_uniform[] = {
/*static const std::pair<uniform_name, bool> PEEL_uniform[] = {
{ U_DEPTH_PEEL , false },
{ U_BONE_MAT , true },
{ U_SKINNING , true },
};*/
static const std::pair<uniform_name, bool> TONEMAP_uniform[] = {
@@ -2319,7 +2319,7 @@ static const std::pair<uniform_name, bool> PUDDLE_uniform[] = {
static const std::pair<uniform_name, bool> 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<uniform_name, bool> S_REFL_uniform[] = {
};
static const std::pair<uniform_name, bool> S_REFR_uniform[] = {
{ U_BONE_MAT , true },
{ U_SKINNING , true },
{ U_TRANSPARENCY , false },
};
@@ -2374,7 +2374,7 @@ static const std::pair<uniform_name, bool> GLITTER_PT_uniform[] = {
/*static const std::pair<uniform_name, bool> SHOW_VEC_uniform[] = {
//{ U16 , true }, // 0th removed
{ U_BONE_MAT , true },
{ U_SKINNING , true },
{ U_SHOW_VECTOR , false },
};*/
+2 -2
View File
@@ -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,