diff --git a/Effects/model-wingflex.eff b/Effects/model-wingflex.eff
index 3efa1a36c..862a1b6e7 100644
--- a/Effects/model-wingflex.eff
+++ b/Effects/model-wingflex.eff
@@ -3,11 +3,29 @@
Effects/model-wingflex
Effects/model-default
+
+
+
+
-
-
+
+ 0
+ 0.7
+ 15.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
0
0
@@ -45,6 +63,8 @@
0
0.0
0
+ 0.0
+ 1
0
Aircraft/Generic/Effects/ReflectMaps/reflectmap.png
@@ -99,6 +119,7 @@
0
+ 0
0
0
@@ -108,6 +129,8 @@
0.0
0.0 0.0 0.0
0.0
+ 0
+ 1.0
0.05
opaque
@@ -142,23 +165,8 @@
-
- 0
- 0.7
- 0.0
- 0.0
- 0.0
- 0.0
- 15.0
-
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
-
+
+
@@ -201,856 +209,827 @@
0
+
+
-
-
-
-
- /sim/rendering/shaders/skydome
- /sim/rendering/shaders/model
-
-
- 2.0
-
-
-
- GL_ARB_shader_objects
- GL_ARB_shading_language_100
- GL_ARB_vertex_shader
- GL_ARB_fragment_shader
-
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
- noise
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 6
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ /sim/rendering/shaders/skydome
+ /sim/rendering/shaders/model
+
+
+ 2.0
+
+
+
+ GL_ARB_shader_objects
+ GL_ARB_shading_language_100
+ GL_ARB_vertex_shader
+ GL_ARB_fragment_shader
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ noise
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Shaders/model-ALS-wingflex.vert
- Shaders/shadows-include.vert
- Shaders/model-ALS-ultra.frag
- Shaders/cloud-shadowfunc.frag
- Shaders/hazes.frag
- Shaders/secondary_lights.frag
- Shaders/noise.frag
- Shaders/filters-ALS.frag
- Shaders/shadows-include.frag
- Shaders/clustered-include.frag
-
-
-
- BaseTex
- sampler-2d
- 0
-
-
-
- ReflNoiseTex
- sampler-3d
- 1
-
-
-
- NormalTex
- sampler-2d
- 2
-
-
-
- LightMapTex
- sampler-2d
- 3
-
-
-
- ReflMapTex
- sampler-2d
- 4
-
-
-
- Environment
- sampler-cube
- 5
-
-
-
- ReflGradientsTex
- sampler-2d
- 6
-
-
-
- GrainTex
- sampler-2d
- 7
-
+
+ Shaders/shadows-include.vert
+ Shaders/model-ALS-ultra.frag
+ Shaders/cloud-shadowfunc.frag
+ Shaders/hazes.frag
+ Shaders/secondary_lights.frag
+ Shaders/noise.frag
+ Shaders/filters-ALS.frag
+ Shaders/shadows-include.frag
+ Shaders/clustered-include.frag
+
-
- wingflex_type
- int
-
-
+
+ BaseTex
+ sampler-2d
+ 0
+
-
- wingflex_alpha
- float
-
-
+
+ ReflNoiseTex
+ sampler-3d
+ 1
+
-
- wingflex_trailing_alpha
- float
-
-
+
+ NormalTex
+ sampler-2d
+ 2
+
-
- wingsweep_factor
- float
-
-
-
-
- wingflex_z
- float
-
-
+
+ LightMapTex
+ sampler-2d
+ 3
+
-
- body_width
- float
-
-
+
+ ReflMapTex
+ sampler-2d
+ 4
+
-
- wing_span
- float
-
-
+
+ Environment
+ sampler-cube
+ 5
+
-
- rotation_rad
- float
-
-
+
+ ReflGradientsTex
+ sampler-2d
+ 6
+
-
- rotation_x1
- float
-
-
+
+ GrainTex
+ sampler-2d
+ 7
+
-
- rotation_y1
- float
-
-
+
+
+
+ nmap_enabled
+ int
+
+
+
+
-
- rotation_z1
- float
-
-
-
-
- rotation_x2
- float
-
-
+
+
+ nmap_dds
+ int
+
+
+
+
-
- rotation_y2
- float
-
-
+
+ nmap_tile
+ float
+
+
+
+
-
- rotation_z2
- float
-
-
-
-
-
-
- nmap_enabled
- int
-
-
-
-
-
-
-
- nmap_dds
- int
-
-
-
-
-
-
- nmap_tile
- float
-
-
-
-
-
-
-
-
- lightmap_enabled
- int
-
-
-
-
-
-
- lightmap_multi
- int
-
-
-
-
-
-
- lightmap_r_factor
- float
-
-
-
-
-
-
- lightmap_r_color
- float-vec3
-
-
-
-
-
-
- lightmap_g_factor
- float
-
-
-
-
-
-
- lightmap_g_color
- float-vec3
-
-
-
-
-
-
- lightmap_b_factor
- float
-
-
-
-
-
-
- lightmap_b_color
- float-vec3
-
-
-
-
-
-
- lightmap_a_factor
- float
-
-
-
-
-
-
- lightmap_a_color
- float-vec3
-
-
-
-
+
+
+
+ lightmap_enabled
+ int
+
+
+
+
+
+
+ lightmap_multi
+ int
+
+
+
+
-
+
+ lightmap_r_factor
+ float
+
+
+
+
+
+
+ lightmap_r_color
+ float-vec3
+
+
+
+
+
+
+ lightmap_g_factor
+ float
+
+
+
+
+
+
+ lightmap_g_color
+ float-vec3
+
+
+
+
+
+
+ lightmap_b_factor
+ float
+
+
+
+
+
+
+ lightmap_b_color
+ float-vec3
+
+
+
+
+
+
+ lightmap_a_factor
+ float
+
+
+
+
+
+
+ lightmap_a_color
+ float-vec3
+
+
+
+
+
+
darkmap_factor
float
-
+
-
-
-
-
- refl_enabled
- int
-
-
-
-
-
-
- refl_correction
- float
-
-
-
-
-
-
-
- refl_map
- int
-
-
-
-
-
-
- refl_dynamic
- int
-
-
-
-
-
-
-
- refl_rainbow
- float
-
-
-
-
-
-
-
- refl_fresnel
- float
-
-
-
-
-
-
-
- refl_noise
- float
-
-
-
-
-
-
-
- dirt_enabled
- int
-
-
-
-
-
-
- dirt_multi
- int
-
-
-
-
-
-
- dirt_r_color
- float-vec3
-
-
-
-
-
-
- dirt_r_factor
- float
-
-
-
-
-
-
- dirt_g_color
- float-vec3
-
-
-
-
-
-
- dirt_g_factor
- float
-
-
-
-
-
-
- dirt_b_color
- float-vec3
-
-
-
-
-
-
- dirt_b_factor
- float
-
-
-
-
-
+
-
-
- grain_texture_enabled
- int
-
-
-
-
-
-
- grain_magnification
- float
-
-
-
-
+
+
+ refl_enabled
+ int
+
+
+
+
+
+
+ refl_correction
+ float
+
+
+
+
-
-
- rain_enabled
- int
-
-
-
-
+
+
+ refl_fresnel_factor
+ float
+
+
+
+
-
-
- amb_correction
- float
-
-
-
-
-
-
- hdg
- float
-
-
-
-
-
-
- pitch
- float
-
-
-
-
-
-
- roll
- float
-
-
-
-
-
-
-
- visibility
- float
-
-
-
-
-
- avisibility
- float
-
-
-
-
-
- hazeLayerAltitude
- float
-
-
-
-
-
- scattering
- float
-
-
-
-
-
- terminator
- float
-
-
-
-
-
- ground_scattering
- float
-
-
-
-
-
- terminator
- float
-
-
-
-
-
- terrain_alt
- float
-
-
-
-
-
- overcast
- float
-
-
-
-
-
- eye_alt
- float
-
-
-
-
-
- cloud_self_shading
- float
-
-
-
- moonlight
- float
-
-
-
- air_pollution
- float
-
-
-
- rain_norm
- float
-
-
-
- wetness
- float
-
-
-
- view_pitch_offset
- float
-
-
-
- view_heading_offset
- float
-
-
-
- field_of_view
- float
-
-
-
- landing_light1_offset
- float
-
-
-
- landing_light2_offset
- float
-
-
-
- landing_light3_offset
- float
-
-
-
-
- gamma
- float
-
-
-
- brightness
- float
-
-
-
- use_filtering
- bool
-
-
-
- use_night_vision
- bool
-
-
-
- use_IR_vision
- bool
-
-
-
- delta_T
- float
-
-
+
+
+ refl_map
+ int
+
+
+
+
+
+
+
+ refl_type
+ int
+
+
+
+
+
+
+
+
+ refl_dynamic
+ int
+
+
+
+
+
+
+
+ refl_rainbow
+ float
+
+
+
+
+
+
+
+ refl_fresnel
+ float
+
+
+
+
+
+
+
+ refl_noise
+ float
+
+
+
+
+
+
+
+ dirt_enabled
+ int
+
+
+
+
+
+
+ dirt_multi
+ int
+
+
+
+
+
+
+ dirt_r_color
+ float-vec3
+
+
+
+
+
+
+ dirt_r_factor
+ float
+
+
+
+
+
+
+ dirt_g_color
+ float-vec3
+
+
+
+
+
+
+ dirt_g_factor
+ float
+
+
+
+
+
+
+ dirt_b_color
+ float-vec3
+
+
+
+
+
+
+ dirt_b_factor
+ float
+
+
+
+
+
+
+ dirt_modulates_reflection
+ int
+
+
+
+
+
+
+ dirt_reflection_factor
+ float
+
+
+
+
+
+
+
+
+ grain_texture_enabled
+ int
+
+
+
+
+
+
+ grain_magnification
+ float
+
+
+
+
+
+
+
+ rain_enabled
+ int
+
+
+
+
+
+
+ snow_enabled
+ int
+
+
+
+
+
+
+ snowlevel
+ float
+
+
+
+
+ snow_thickness_factor
+ float
+
+
+
+
+
+ amb_correction
+ float
+
+
+
+
+
+
+ hdg
+ float
+
+
+
+
+
+
+ pitch
+ float
+
+
+
+
+
+
+ roll
+ float
+
+
+
+
+
+
+
+ visibility
+ float
+
+
+
+
+
+ avisibility
+ float
+
+
+
+
+
+ hazeLayerAltitude
+ float
+
+
+
+
+
+ scattering
+ float
+
+
+
+
+
+ terminator
+ float
+
+
+
+
+
+ ground_scattering
+ float
+
+
+
+
+
+ terminator
+ float
+
+
+
+
+
+ terrain_alt
+ float
+
+
+
+
+
+ overcast
+ float
+
+
+
+
+
+ eye_alt
+ float
+
+
+
+
+
+ cloud_self_shading
+ float
+
+
+
+ moonlight
+ float
+
+
+
+ air_pollution
+ float
+
+
+
+ rain_norm
+ float
+
+
+
+ wetness
+ float
+
+
+
+ view_pitch_offset
+ float
+
+
+
+ view_heading_offset
+ float
+
+
+
+ field_of_view
+ float
+
+
+
+ landing_light1_offset
+ float
+
+
+
+ landing_light2_offset
+ float
+
+
+
+ landing_light3_offset
+ float
+
+
+
+ gamma
+ float
+
+
+
+ brightness
+ float
+
+
+
+ use_filtering
+ bool
+
+
+
+ use_night_vision
+ bool
+
+
+
+ use_IR_vision
+ bool
+
+
+
+ delta_T
+ float
+
+
fact_grey
float
@@ -1061,270 +1040,437 @@
float
-
-
- cloudpos1_x
- float
-
-
-
- cloudpos1_y
- float
-
-
-
- cloudpos2_x
- float
-
-
-
- cloudpos2_y
- float
-
-
-
- cloudpos3_x
- float
-
-
-
- cloudpos3_y
- float
-
-
-
- cloudpos4_x
- float
-
-
-
- cloudpos4_y
- float
-
-
-
- cloudpos5_x
- float
-
-
-
- cloudpos5_y
- float
-
-
-
- cloudpos6_x
- float
-
-
-
- cloudpos6_y
- float
-
-
-
- cloudpos7_x
- float
-
-
-
- cloudpos7_y
- float
-
-
-
- cloudpos8_x
- float
-
-
-
- cloudpos8_y
- float
-
-
-
- cloudpos9_x
- float
-
-
-
- cloudpos9_y
- float
-
-
-
- cloudpos10_x
- float
-
-
-
- cloudpos10_y
- float
-
-
-
- cloudpos11_x
- float
-
-
-
- cloudpos11_y
- float
-
-
-
- cloudpos12_x
- float
-
-
-
- cloudpos12_y
- float
-
-
-
- cloudpos13_x
- float
-
-
-
- cloudpos13_y
- float
-
-
-
- cloudpos14_x
- float
-
-
-
- cloudpos14_y
- float
-
-
-
- cloudpos15_x
- float
-
-
-
- cloudpos15_y
- float
-
-
-
- cloudpos16_x
- float
-
-
-
- cloudpos16_y
- float
-
-
-
- cloudpos17_x
- float
-
-
-
- cloudpos17_y
- float
-
-
-
- cloudpos18_x
- float
-
-
-
- cloudpos18_y
- float
-
-
-
- cloudpos19_x
- float
-
-
-
- cloudpos19_y
- float
-
-
-
- cloudpos20_x
- float
-
-
-
- cloudpos20_y
- float
-
-
-
- cloud_shadow_flag
- int
-
-
-
- use_searchlight
- int
-
-
-
- use_landing_light
- int
-
-
-
- use_alt_landing_light
- int
-
-
-
- display_xsize
- int
-
-
-
- display_ysize
- int
-
-
-
- darkmap_enabled
- int
-
-
-
- building_flag
- int
-
-
-
-
-
- shadow_tex
- sampler-2d
- 10
-
-
- shadows_enabled
- bool
-
-
-
-
-
- sun_atlas_size
- int
-
-
-
-
-
-
-
+
+ quality_level
+ int
+
+
+
+ tquality_level
+ int
+
+
+
+
+
+ cloudpos1_x
+ float
+
+
+
+ cloudpos1_y
+ float
+
+
+
+ cloudpos2_x
+ float
+
+
+
+ cloudpos2_y
+ float
+
+
+
+ cloudpos3_x
+ float
+
+
+
+ cloudpos3_y
+ float
+
+
+
+ cloudpos4_x
+ float
+
+
+
+ cloudpos4_y
+ float
+
+
+
+ cloudpos5_x
+ float
+
+
+
+ cloudpos5_y
+ float
+
+
+
+ cloudpos6_x
+ float
+
+
+
+ cloudpos6_y
+ float
+
+
+
+ cloudpos7_x
+ float
+
+
+
+ cloudpos7_y
+ float
+
+
+
+ cloudpos8_x
+ float
+
+
+
+ cloudpos8_y
+ float
+
+
+
+ cloudpos9_x
+ float
+
+
+
+ cloudpos9_y
+ float
+
+
+
+ cloudpos10_x
+ float
+
+
+
+ cloudpos10_y
+ float
+
+
+
+ cloudpos11_x
+ float
+
+
+
+ cloudpos11_y
+ float
+
+
+
+ cloudpos12_x
+ float
+
+
+
+ cloudpos12_y
+ float
+
+
+
+ cloudpos13_x
+ float
+
+
+
+ cloudpos13_y
+ float
+
+
+
+ cloudpos14_x
+ float
+
+
+
+ cloudpos14_y
+ float
+
+
+
+ cloudpos15_x
+ float
+
+
+
+ cloudpos15_y
+ float
+
+
+
+ cloudpos16_x
+ float
+
+
+
+ cloudpos16_y
+ float
+
+
+
+ cloudpos17_x
+ float
+
+
+
+ cloudpos17_y
+ float
+
+
+
+ cloudpos18_x
+ float
+
+
+
+ cloudpos18_y
+ float
+
+
+
+ cloudpos19_x
+ float
+
+
+
+ cloudpos19_y
+ float
+
+
+
+ cloudpos20_x
+ float
+
+
+
+ cloudpos20_y
+ float
+
+
+
+ cloud_shadow_flag
+ int
+
+
+
+ use_searchlight
+ int
+
+
+
+ use_landing_light
+ int
+
+
+
+ use_alt_landing_light
+ int
+
+
+
+ display_xsize
+ int
+
+
+
+ display_ysize
+ int
+
+
+
+ darkmap_enabled
+ int
+
+
+
+ building_flag
+ int
+
+
+
+
+
+
+ shadow_tex
+ sampler-2d
+ 10
+
+
+ shadows_enabled
+ bool
+
+
+
+
+
+ sun_atlas_size
+ int
+
+
+
+
+
+
+
+
+ wingflex_type
+ int
+
+
+
+
+ wingflex_alpha
+ float
+
+
+
+
+ wingflex_trailing_alpha
+ float
+
+
+
+
+ wingsweep_factor
+ float
+
+
+
+
+ wingflex_z
+ float
+
+
+
+
+ body_width
+ float
+
+
+
+
+ wing_span
+ float
+
+
+
+
+ rotation_rad
+ float
+
+
+
+
+ rotation_x1
+ float
+
+
+
+
+ rotation_y1
+ float
+
+
+
+
+ rotation_z1
+ float
+
+
+
+
+ rotation_x2
+ float
+
+
+
+
+ rotation_y2
+ float
+
+
+
+
+ rotation_z2
+ float
+
+
+
+
+
+
+
+ hdr-geometry
+
+
+
+ gequal
+ 1.0
+ 0.0
+
+
+ always
+ 8
+ replace
+
+
+ 0
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+ back
+
+ Shaders/HDR/geometry-combined.vert
+ Shaders/HDR/geometry-combined.frag
+ Shaders/HDR/gbuffer-include.frag
+
+
+ color_tex
+ sampler-2d
+ 0
+
+
+ normal_tex
+ sampler-2d
+ 1
+
+
+ normalmap_enabled
+ int
+
+
+
+ normalmap_dds
+ int
+
+
+
+ normalmap_tiling
+ float
+
+
+
+
+
+
+
+ false
+
diff --git a/Shaders/model-ALS-wingflex.vert b/Shaders/model-ALS-wingflex.vert
index ec758816b..ffdf22687 100644
--- a/Shaders/model-ALS-wingflex.vert
+++ b/Shaders/model-ALS-wingflex.vert
@@ -1,11 +1,15 @@
// -*- mode: C; -*-
// Licence: GPL v2
-// based on
// © Emilian Huminiuc and Vivian Meazza 2011
-// addition for wingflex mesh distortion by Thorsten Renk 2015
-
#version 120
+
+
+// the file is directly copied from model-combined.eff except the (three) WINGFLEX to END WINGLFEX parts
+// and the subsequent gl_Vertex integrations
+// I didnt find how to do a more beautiful way (including model-combined and only adding the wingflexer part)
+// if you know how to do this, please do :)
+
varying vec3 rawpos;
varying vec3 VNormal;
varying vec3 VTangent;
@@ -22,7 +26,12 @@ attribute vec3 binormal;
uniform float pitch;
uniform float roll;
uniform float hdg;
-uniform int wingflex_type;
+uniform int refl_dynamic;
+uniform int nmap_enabled;
+uniform int shader_qual;
+
+// WINGFLEX
+uniform int wingflex_type;
uniform float body_width;
uniform float wingflex_alpha;
uniform float wingflex_trailing_alpha;
@@ -36,33 +45,14 @@ uniform float rotation_x2;
uniform float rotation_y2;
uniform float rotation_z2;
uniform float rotation_rad;
-uniform int refl_dynamic;
-uniform int nmap_enabled;
-uniform int shader_qual;
+// END WINGFLEX
//////Fog Include///////////
// uniform int fogType;
// void fog_Func(int type);
////////////////////////////
-void setupShadows(vec4 eyeSpacePos);
-
-void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat)
-{
- rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0,
- 0.0 , cosRx , -sinRx * cosRx, 0.0,
- -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0,
- 0.0 , 0.0 , 0.0 , 1.0 );
-}
-
-void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat)
-{
- rotmat = mat4( cosRz, -sinRz, 0.0, 0.0,
- sinRz, cosRz, 0.0, 0.0,
- 0.0 , 0.0 , 1.0, 0.0,
- 0.0 , 0.0 , 0.0, 1.0 );
-}
-
+// WINGFLEX
vec2 calc_deflection(float y){
float distance;
float bwh = body_width/2;
@@ -85,20 +75,37 @@ vec2 calc_deflection(float y){
vec2 returned = vec2 ( deflection, delta_y );
return returned;
}
+// END WINGFLEX
+
+void setupShadows(vec4 eyeSpacePos);
+
+void rotationMatrixPR(in float sinRx, in float cosRx, in float sinRy, in float cosRy, out mat4 rotmat)
+{
+ rotmat = mat4( cosRy , sinRx * sinRy , cosRx * sinRy, 0.0,
+ 0.0 , cosRx , -sinRx * cosRx, 0.0,
+ -sinRy, sinRx * cosRy, cosRx * cosRy , 0.0,
+ 0.0 , 0.0 , 0.0 , 1.0 );
+}
+
+void rotationMatrixH(in float sinRz, in float cosRz, out mat4 rotmat)
+{
+ rotmat = mat4( cosRz, -sinRz, 0.0, 0.0,
+ sinRz, cosRz, 0.0, 0.0,
+ 0.0 , 0.0 , 1.0, 0.0,
+ 0.0 , 0.0 , 0.0, 1.0 );
+}
void main(void)
{
+ // WINGFLEX
vec4 vertex = gl_Vertex;
-
+
if ( wingflex_type == 0 ) {
- float x_factor = max((abs(vertex.x) - body_width),0);
- float y_factor = max(vertex.y,0.0);
-
- vec2 deflection=calc_deflection(vertex.y);
-
+ vec2 deflection = calc_deflection(vertex.y);
+
vertex.z += deflection[0];
vertex.y += deflection[1];
-
+
if(rotation_rad != 0){
vec2 defl1=calc_deflection(rotation_y1);
vec2 defl2=calc_deflection(rotation_y2);
@@ -136,7 +143,7 @@ void main(void)
vertex.y=new_point[1];
vertex.z=new_point[2];
}
-
+
} else if (wingflex_type == 1 ) {
float arm_reach = 4.8;
@@ -152,14 +159,14 @@ void main(void)
// basic flapping motion is linear to arm_reach, then parabolic
float intercept_point = 0.1 * arm_reach * arm_reach * flex_factor1;
-
+
if (x_factor < arm_reach)
{
vertex.z += x_factor/arm_reach * intercept_point;
}
- else
- {
+ else
+ {
vertex.z += 0.1 * x_factor * x_factor * flex_factor1;
}
@@ -176,13 +183,16 @@ void main(void)
if (vertex.x > 0.0) {sweep_x = - 0.5;}
vertex.x+= sweep_x * (1.0 + 0.5 *x_factor) * wingsweep_factor;
-
-
- }
+ }
+ // END WINGFLEX
+
rawpos = vertex.xyz;
vec4 ecPosition = gl_ModelViewMatrix * vertex;
+ //rawpos = gl_Vertex.xyz;
+ //vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
+ //fog_Func(fogType);
VNormal = normalize(gl_NormalMatrix * gl_Normal);
@@ -240,6 +250,7 @@ void main(void)
reflVec = reflVec_stat;
}
+
gl_FrontColor = gl_FrontMaterial.emission + gl_Color
* (gl_LightModel.ambient + gl_LightSource[0].ambient);
@@ -247,5 +258,6 @@ void main(void)
//gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+
setupShadows(ecPosition);
}