mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 14:55:08 -06:00
Some shader compilers did not seemingly like #if XXX blocks
if XXX was not defined. Changed to #ifdef XXX.
This commit is contained in:
parent
9f6bf5a835
commit
2c8a92cacb
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ struct SlopeDetection
|
|||
uniform vec4 uniform_color;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
#if ENABLE_ENVIRONMENT_MAP
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
uniform sampler2D environment_tex;
|
||||
uniform bool use_environment_tex;
|
||||
#endif // ENABLE_ENVIRONMENT_MAP
|
||||
|
@ -44,7 +44,7 @@ void main()
|
|||
vec3 color = slope.actived ? slope_color() : uniform_color.rgb;
|
||||
// if the fragment is outside the print volume -> use darker color
|
||||
color = (any(lessThan(delta_box_min, ZERO)) || any(greaterThan(delta_box_max, ZERO))) ? mix(color, ZERO, 0.3333) : color;
|
||||
#if ENABLE_ENVIRONMENT_MAP
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
if (use_environment_tex)
|
||||
gl_FragColor = vec4(0.45 * texture2D(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color * intensity.x, uniform_color.a);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue