Fixed shadows and Litproj

This commit is contained in:
korenkonder
2024-01-12 08:20:15 +03:00
parent f53da6a0bf
commit 85084aed29
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -622,7 +622,7 @@ HOOK(void, FASTCALL, auth_3d_m_object_hrc_disp, 0x00000001401D0760, auth_3d_m_ob
disp_manager.set_shadow_type(shadow_type);
Shadow* shad = shadow_ptr_get();
if (shad && flags & mdl::OBJ_SHADOW) {
if (shad && (flags & mdl::OBJ_SHADOW)) {
disp_manager.set_shadow_type(SHADOW_STAGE);
mat4* m = &moh->model_transform.mat;
+1 -1
View File
@@ -1324,7 +1324,7 @@ static bool draw_pass_shadow_litproj() {
glClearDepthf(1.0f);
glClearDLL(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if (!draw_pass_shadow_litproj_set_mat(false)) {
if (!draw_pass_shadow_litproj_set_mat(true)) {
gl_state_bind_framebuffer(0);
return false;
}
+7 -7
View File
@@ -1946,7 +1946,7 @@ static const std::pair<uniform_name, bool> BLINN_uniform[] = {
//{ U16 , true }, // 0th removed
{ U_BONE_MAT , true },
{ U_TEXTURE_COUNT, false },
{ U_LIGHT_1 , false },
{ U_LIGHT_0 , false },
{ U_NORMAL , false },
{ U_SPECULAR , false },
{ U_ENV_MAP , false },
@@ -1981,7 +1981,7 @@ static const std::pair<uniform_name, bool> STAGE_uniform[] = {
{ U_MORPH_COLOR , true },
{ U_TEXTURE_COUNT, false },
{ U_ENV_MAP , false },
{ U_LIGHT_1 , false },
{ U_LIGHT_0 , false },
{ U_NORMAL , false },
{ U_FOG_HEIGHT , false },
{ U_LIGHT_1 , false },
@@ -2163,7 +2163,7 @@ static const std::pair<uniform_name, bool> LAMBERT_uniform[] = {
//{ U16 , true }, // 0th removed
{ U_BONE_MAT , true },
{ U_TEXTURE_COUNT, false },
{ U_LIGHT_1 , false },
{ U_LIGHT_0 , false },
{ U_FOG_HEIGHT , false },
{ U_MORPH , true },
{ U_MORPH_COLOR , true },
@@ -2258,7 +2258,7 @@ static const std::pair<uniform_name, bool> WATER01_uniform[] = {
};*/
/*static const std::pair<uniform_name, bool> WATRING_uniform[] = {
{ U_LIGHT_1 , false },
{ U_LIGHT_0 , false },
{ U_LIGHT_1 , false },
};*/
@@ -2282,7 +2282,7 @@ static const std::pair<uniform_name, bool> STAR_uniform[] = {
{ U_TEXTURE_COUNT, false },
{ U_NORMAL , false },
{ U_SPECULAR , false },
{ U_LIGHT_1 , false },
{ U_LIGHT_0 , false },
{ U_LIGHT_1 , false },
};
@@ -2301,7 +2301,7 @@ static const std::pair<uniform_name, bool> SN_NRM_uniform[] = {
static const std::pair<uniform_name, bool> FLOOR_uniform[] = {
{ U_TEXTURE_COUNT, false },
{ U_NORMAL , false },
{ U_LIGHT_1 , false },
{ U_LIGHT_0 , false },
{ U_LIGHT_1 , false },
{ U_FOG_HEIGHT , false },
{ U_MORPH , true },
@@ -2311,7 +2311,7 @@ static const std::pair<uniform_name, bool> FLOOR_uniform[] = {
static const std::pair<uniform_name, bool> PUDDLE_uniform[] = {
{ U_NORMAL , false },
{ U_LIGHT_1 , false },
{ U_LIGHT_0 , false },
{ U_LIGHT_1 , false },
{ U_FOG_HEIGHT , false },
};