Named some shader fields
This commit is contained in:
@@ -1114,7 +1114,7 @@ static void draw_pass_shadow_begin_make_shadowmap(Shadow* shad, int32_t index, i
|
||||
glClearColorDLL(1.0, 1.0, 1.0, 1.0);
|
||||
if (!a3)
|
||||
glClearDLL(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
else if (shad->field_2F5)
|
||||
else if (shad->separate)
|
||||
glClearDLL(GL_COLOR_BUFFER_BIT);
|
||||
glScissorDLL(1, 1, tex->width - 2, tex->height - 2);
|
||||
|
||||
@@ -1122,7 +1122,7 @@ static void draw_pass_shadow_begin_make_shadowmap(Shadow* shad, int32_t index, i
|
||||
float_t offset;
|
||||
vec3* interest;
|
||||
vec3* view_point;
|
||||
if (shad->field_2F5) {
|
||||
if (shad->separate) {
|
||||
offset = index ? 0.5f : -0.5f;
|
||||
interest = &shad->interest[index];
|
||||
view_point = &shad->view_point[index];
|
||||
@@ -1150,7 +1150,7 @@ static void draw_pass_shadow_end_make_shadowmap(Shadow* shad, int32_t index, int
|
||||
gl_state_disable_scissor_test();
|
||||
|
||||
draw_state->shader_index = -1;
|
||||
if (a3 == shad->field_2EC - 1) {
|
||||
if (a3 == shad->num_light - 1) {
|
||||
draw_pass_shadow_filter(&shad->render_textures[3],
|
||||
&shad->render_textures[4], shad->curr_render_textures[0],
|
||||
shad->field_2DC, shad->field_2E0 / (shad->field_208 * 2.0f), false);
|
||||
@@ -1602,7 +1602,7 @@ static void draw_pass_3d_shadow_reset() {
|
||||
}
|
||||
|
||||
static void draw_pass_3d_shadow_set(Shadow* shad) {
|
||||
if (shad->self_shadow && shad->field_2EC > 0) {
|
||||
if (shad->self_shadow && shad->num_light > 0) {
|
||||
gl_state_active_bind_texture_2d(19, shad->render_textures[3].GetColorTex());
|
||||
gl_state_active_bind_texture_2d(20, shad->render_textures[5].GetColorTex());
|
||||
gl_state_active_texture(0);
|
||||
@@ -1617,16 +1617,16 @@ static void draw_pass_3d_shadow_set(Shadow* shad) {
|
||||
draw_state->self_shadow = false;
|
||||
}
|
||||
|
||||
if (shad->field_2EC > 0) {
|
||||
if (shad->num_light > 0) {
|
||||
draw_state->light = true;
|
||||
uniform->arr[U_LIGHT_1] = shad->field_2EC > 1 ? 1 : 0;
|
||||
uniform->arr[U_LIGHT_1] = shad->num_light > 1 ? 1 : 0;
|
||||
|
||||
float_t range = shad->get_range();
|
||||
for (int32_t i = 0; i < 2; i++) {
|
||||
float_t offset;
|
||||
vec3* interest;
|
||||
vec3* view_point;
|
||||
if (shad->field_2F5) {
|
||||
if (shad->separate) {
|
||||
offset = i ? 0.5f : -0.5f;
|
||||
|
||||
interest = &shad->interest[i];
|
||||
@@ -1655,7 +1655,7 @@ static void draw_pass_3d_shadow_set(Shadow* shad) {
|
||||
|
||||
int32_t j = 0;
|
||||
for (int32_t i = 0; i < 2; i++)
|
||||
if (shad->field_2F0[i]) {
|
||||
if (shad->light_enable[i]) {
|
||||
gl_state_active_bind_texture_2d(6 + j, shad->curr_render_textures[1 + i]->GetColorTex());
|
||||
glTexParameterfDLL(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 16.0f);
|
||||
j++;
|
||||
|
||||
Reference in New Issue
Block a user