mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'zesterer-master-patch-44077' into 'master'
Fixed lightning point glow See merge request veloren/veloren!3477
This commit is contained in:
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include "sky.glsl"
|
#include "sky.glsl"
|
||||||
|
|
||||||
#ifdef POINT_GLOW_FACTOR
|
|
||||||
void apply_point_glow_light(Light L, vec3 wpos, vec3 dir, float max_dist, inout vec3 color) {
|
void apply_point_glow_light(Light L, vec3 wpos, vec3 dir, float max_dist, inout vec3 color) {
|
||||||
vec3 light_pos = L.light_pos.xyz;
|
vec3 light_pos = L.light_pos.xyz;
|
||||||
// Project light_pos to dir line
|
// Project light_pos to dir line
|
||||||
@ -39,10 +38,12 @@ void apply_point_glow_light(Light L, vec3 wpos, vec3 dir, float max_dist, inout
|
|||||||
const float LIGHT_AMBIANCE = 0.025;
|
const float LIGHT_AMBIANCE = 0.025;
|
||||||
color += light_color
|
color += light_color
|
||||||
* 0.002
|
* 0.002
|
||||||
|
#ifdef POINT_GLOW_FACTOR
|
||||||
// Constant, *should* const fold
|
// Constant, *should* const fold
|
||||||
* POINT_GLOW_FACTOR;
|
* POINT_GLOW_FACTOR
|
||||||
|
#endif
|
||||||
|
;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
vec3 apply_point_glow(vec3 wpos, vec3 dir, float max_dist, vec3 color) {
|
vec3 apply_point_glow(vec3 wpos, vec3 dir, float max_dist, vec3 color) {
|
||||||
#ifndef POINT_GLOW_FACTOR
|
#ifndef POINT_GLOW_FACTOR
|
||||||
|
Reference in New Issue
Block a user