parent
bef383985e
commit
769341e180
4 changed files with 0 additions and 9 deletions
|
@ -165,10 +165,8 @@ uniform int spot_light_count;
|
||||||
out vec4 diffuse_light_interp;
|
out vec4 diffuse_light_interp;
|
||||||
out vec4 specular_light_interp;
|
out vec4 specular_light_interp;
|
||||||
|
|
||||||
|
|
||||||
void light_compute(vec3 N, vec3 L, vec3 V, vec3 light_color, float roughness, inout vec3 diffuse, inout vec3 specular) {
|
void light_compute(vec3 N, vec3 L, vec3 V, vec3 light_color, float roughness, inout vec3 diffuse, inout vec3 specular) {
|
||||||
|
|
||||||
|
|
||||||
float NdotL = dot(N, L);
|
float NdotL = dot(N, L);
|
||||||
float cNdotL = max(NdotL, 0.0); // clamped NdotL
|
float cNdotL = max(NdotL, 0.0); // clamped NdotL
|
||||||
float NdotV = dot(N, V);
|
float NdotV = dot(N, V);
|
||||||
|
@ -225,8 +223,6 @@ void light_compute(vec3 N, vec3 L, vec3 V, vec3 light_color, float roughness, in
|
||||||
|
|
||||||
specular += specular_brdf_NL * light_color * (1.0 / M_PI);
|
specular += specular_brdf_NL * light_color * (1.0 / M_PI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void light_process_omni(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, float roughness, inout vec3 diffuse, inout vec3 specular) {
|
void light_process_omni(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, float roughness, inout vec3 diffuse, inout vec3 specular) {
|
||||||
|
|
|
@ -320,7 +320,6 @@ void AnimationNodeBlendSpace2D::_update_triangles() {
|
||||||
if (!auto_triangles || !trianges_dirty)
|
if (!auto_triangles || !trianges_dirty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
print_line("updating triangles");
|
|
||||||
trianges_dirty = false;
|
trianges_dirty = false;
|
||||||
triangles.clear();
|
triangles.clear();
|
||||||
if (blend_points_used < 3) {
|
if (blend_points_used < 3) {
|
||||||
|
@ -336,8 +335,6 @@ void AnimationNodeBlendSpace2D::_update_triangles() {
|
||||||
|
|
||||||
Vector<Delaunay2D::Triangle> triangles = Delaunay2D::triangulate(points);
|
Vector<Delaunay2D::Triangle> triangles = Delaunay2D::triangulate(points);
|
||||||
|
|
||||||
print_line("triangles generated: " + itos(triangles.size()));
|
|
||||||
|
|
||||||
for (int i = 0; i < triangles.size(); i++) {
|
for (int i = 0; i < triangles.size(); i++) {
|
||||||
add_triangle(triangles[i].points[0], triangles[i].points[1], triangles[i].points[2]);
|
add_triangle(triangles[i].points[0], triangles[i].points[1], triangles[i].points[2]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -763,7 +763,6 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
|
||||||
cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized();
|
cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized();
|
||||||
|
|
||||||
float owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx);
|
float owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx);
|
||||||
print_line("margin: " + rtos(owc_margin));
|
|
||||||
cbk.valid_depth = MAX(owc_margin, p_margin); //user specified, but never less than actual margin or it wont work
|
cbk.valid_depth = MAX(owc_margin, p_margin); //user specified, but never less than actual margin or it wont work
|
||||||
cbk.invalid_by_dir = 0;
|
cbk.invalid_by_dir = 0;
|
||||||
|
|
||||||
|
|
|
@ -1110,7 +1110,6 @@ void VisualServerCanvas::canvas_light_set_shadow_buffer_size(RID p_light, int p_
|
||||||
if (new_size == clight->shadow_buffer_size)
|
if (new_size == clight->shadow_buffer_size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
print_line("create shadow buffer: " + itos(p_size));
|
|
||||||
clight->shadow_buffer_size = next_power_of_2(p_size);
|
clight->shadow_buffer_size = next_power_of_2(p_size);
|
||||||
|
|
||||||
if (clight->shadow_buffer.is_valid()) {
|
if (clight->shadow_buffer.is_valid()) {
|
||||||
|
|
Loading…
Reference in a new issue