mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
if/ifdef fix
This commit is contained in:
@@ -12,7 +12,7 @@ void main()
|
||||
{
|
||||
vec4 tex_color = texture(tex1, f_coord);
|
||||
gl_FragData[0] = tex_color * param[0];
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
gl_FragData[1] = vec4(0.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ in vec3 f_color;
|
||||
void main()
|
||||
{
|
||||
gl_FragData[0] = vec4(f_color, 1.0f);
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
gl_FragData[1] = vec4(0.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ void main()
|
||||
if (dist2 > 0.5f * 0.5f)
|
||||
discard;
|
||||
gl_FragData[0] = vec4(param[0].rgb * emission, 1.0f);
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
{
|
||||
vec2 a = (f_clip_future_pos.xy / f_clip_future_pos.w) * 0.5 + 0.5;;
|
||||
vec2 b = (f_clip_pos.xy / f_clip_pos.w) * 0.5 + 0.5;;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
float calc_shadow()
|
||||
{
|
||||
#ifdef SHADOWMAP_ENABLED
|
||||
#if SHADOWMAP_ENABLED
|
||||
vec3 coords = f_light_pos.xyz / f_light_pos.w;
|
||||
|
||||
if (coords.z < 0.0f)
|
||||
|
||||
@@ -13,7 +13,7 @@ void main()
|
||||
{
|
||||
vec4 tex_color = texture(tex1, f_coord);
|
||||
gl_FragData[0] = tex_color * param[0];
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
gl_FragData[1] = vec4(0.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@ in vec4 f_clip_future_pos;
|
||||
#param (specular, 1, 1, 1, specular)
|
||||
#param (reflection, 1, 2, 1, zero)
|
||||
|
||||
#ifdef SHADOWMAP_ENABLED
|
||||
#if SHADOWMAP_ENABLED
|
||||
uniform sampler2DShadow shadowmap;
|
||||
#endif
|
||||
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
uniform samplerCube envmap;
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@ void main()
|
||||
|
||||
vec3 normal = normalize(f_normal);
|
||||
vec3 refvec = reflect(f_pos.xyz, normal);
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
vec3 envcolor = texture(envmap, refvec).rgb;
|
||||
#else
|
||||
vec3 envcolor = vec3(0.5);
|
||||
@@ -62,7 +62,7 @@ void main()
|
||||
}
|
||||
|
||||
gl_FragData[0] = vec4(apply_fog(result * tex_color.rgb), tex_color.a);
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
{
|
||||
vec2 a = (f_clip_future_pos.xy / f_clip_future_pos.w) * 0.5 + 0.5;;
|
||||
vec2 b = (f_clip_pos.xy / f_clip_pos.w) * 0.5 + 0.5;;
|
||||
|
||||
@@ -18,11 +18,11 @@ in vec4 f_clip_future_pos;
|
||||
#texture (diffuse, 0, sRGB_A)
|
||||
uniform sampler2D diffuse;
|
||||
|
||||
#ifdef SHADOWMAP_ENABLED
|
||||
#if SHADOWMAP_ENABLED
|
||||
uniform sampler2DShadow shadowmap;
|
||||
#endif
|
||||
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
uniform samplerCube envmap;
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@ void main()
|
||||
|
||||
vec3 normal = normalize(f_normal);
|
||||
vec3 refvec = reflect(f_pos.xyz, normal);
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
vec3 envcolor = texture(envmap, refvec).rgb;
|
||||
#else
|
||||
vec3 envcolor = vec3(0.5);
|
||||
@@ -69,7 +69,7 @@ void main()
|
||||
|
||||
gl_FragData[0] = vec4(apply_fog(result * tex_color.rgb), tex_color.a);
|
||||
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
{
|
||||
vec2 a = (f_clip_future_pos.xy / f_clip_future_pos.w) * 0.5 + 0.5;;
|
||||
vec2 b = (f_clip_pos.xy / f_clip_pos.w) * 0.5 + 0.5;;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
void main()
|
||||
{
|
||||
gl_FragData[0] = vec4(1.0, 0.0, 1.0, 1.0);
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
gl_FragData[1] = vec4(0.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ uniform sampler2D diffuse;
|
||||
#texture (normalmap, 1, RGB)
|
||||
uniform sampler2D normalmap;
|
||||
|
||||
#ifdef SHADOWMAP_ENABLED
|
||||
#if SHADOWMAP_ENABLED
|
||||
uniform sampler2DShadow shadowmap;
|
||||
#endif
|
||||
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
uniform samplerCube envmap;
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@ void main()
|
||||
|
||||
vec3 normal = f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0);
|
||||
vec3 refvec = reflect(f_pos.xyz, normal);
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
vec3 envcolor = texture(envmap, refvec).rgb;
|
||||
#else
|
||||
vec3 envcolor = vec3(0.5);
|
||||
@@ -74,7 +74,7 @@ void main()
|
||||
|
||||
gl_FragData[0] = vec4(apply_fog(result * tex_color.rgb), tex_color.a);
|
||||
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
{
|
||||
vec2 a = (f_clip_future_pos.xy / f_clip_future_pos.w) * 0.5 + 0.5;;
|
||||
vec2 b = (f_clip_pos.xy / f_clip_pos.w) * 0.5 + 0.5;;
|
||||
|
||||
@@ -21,11 +21,11 @@ uniform sampler2D diffuse;
|
||||
#texture (reflmap, 1, R)
|
||||
uniform sampler2D reflmap;
|
||||
|
||||
#ifdef SHADOWMAP_ENABLED
|
||||
#if SHADOWMAP_ENABLED
|
||||
uniform sampler2DShadow shadowmap;
|
||||
#endif
|
||||
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
uniform samplerCube envmap;
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ void main()
|
||||
|
||||
vec3 normal = normalize(f_normal);
|
||||
vec3 refvec = reflect(f_pos.xyz, normal);
|
||||
#ifdef ENVMAP_ENABLED
|
||||
#if ENVMAP_ENABLED
|
||||
vec3 envcolor = texture(envmap, refvec).rgb;
|
||||
#else
|
||||
vec3 envcolor = vec3(0.5);
|
||||
@@ -72,7 +72,7 @@ void main()
|
||||
|
||||
gl_FragData[0] = vec4(apply_fog(result * tex_color.rgb), tex_color.a);
|
||||
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
{
|
||||
vec2 a = (f_clip_future_pos.xy / f_clip_future_pos.w) * 0.5 + 0.5;;
|
||||
vec2 b = (f_clip_pos.xy / f_clip_pos.w) * 0.5 + 0.5;;
|
||||
|
||||
@@ -14,7 +14,7 @@ void main()
|
||||
|
||||
// color data is shared with normals, ugh
|
||||
gl_FragData[0] = vec4(f_normal_raw.bgr, 1.0f);
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
gl_FragData[1] = vec4(0.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ in vec4 f_clip_future_pos;
|
||||
void main()
|
||||
{
|
||||
gl_FragData[0] = param[0];
|
||||
#ifdef MOTIONBLUR_ENABLED
|
||||
#if MOTIONBLUR_ENABLED
|
||||
{
|
||||
vec2 a = (f_clip_future_pos.xy / f_clip_future_pos.w) * 0.5 + 0.5;;
|
||||
vec2 b = (f_clip_pos.xy / f_clip_pos.w) * 0.5 + 0.5;;
|
||||
|
||||
Reference in New Issue
Block a user