mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 18:39:18 +02:00
configure lightning when no vehicles
This commit is contained in:
@@ -3146,12 +3146,6 @@ void opengl_renderer::Update_Lights(light_array &Lights)
|
|||||||
return (glm::length2(camera - Left.position) * (1.f - Left.intensity)) < (glm::length2(camera - Right.position) * (1.f - Right.intensity));
|
return (glm::length2(camera - Left.position) * (1.f - Left.intensity)) < (glm::length2(camera - Right.position) * (1.f - Right.intensity));
|
||||||
});
|
});
|
||||||
|
|
||||||
size_t const count = std::min(m_lights.size(), Lights.data.size());
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto renderlight = m_lights.begin();
|
auto renderlight = m_lights.begin();
|
||||||
size_t light_i = 1;
|
size_t light_i = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ void main()
|
|||||||
if (tex_color.a < opacity)
|
if (tex_color.a < opacity)
|
||||||
discard;
|
discard;
|
||||||
|
|
||||||
vec3 normal = normalize(f_normal);
|
vec3 normal = f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0);
|
||||||
vec3 refvec = reflect(f_pos, normal);
|
vec3 refvec = reflect(f_pos, normal);
|
||||||
vec3 envcolor = texture(envmap, refvec).rgb;
|
vec3 envcolor = texture(envmap, refvec).rgb;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user