Merge branch 'next' of https://git.code.sf.net/p/flightgear/fgdata into next
This commit is contained in:
commit
34f9480f2c
58 changed files with 238 additions and 133 deletions
|
@ -1061,31 +1061,43 @@
|
|||
d="m 521.984,441.616 -19.987,-0.01 0.01,245.247 19.987,0.01 -0.01,-245.246 z"
|
||||
id="locPtr2"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="#locPtr" /><circle
|
||||
inkscape:label="#locPtr" /><path
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,437.361,-328.129)"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
sodipodi:ry="6.71751"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:cx="380.07"
|
||||
id="path3951"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /><circle
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
sodipodi:type="arc" /><path
|
||||
sodipodi:type="arc"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="path3953"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,512.923,-328.129)"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /><circle
|
||||
sodipodi:cx="380.07"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:ry="6.71751"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,512.923,-328.129)" /><path
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,663.814,-328.129)"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
sodipodi:ry="6.71751"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:cx="380.07"
|
||||
id="path3955"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /><circle
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
sodipodi:type="arc" /><path
|
||||
sodipodi:type="arc"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="path3959"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,739.667,-328.128)"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /></g><g
|
||||
sodipodi:cx="380.07"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:ry="6.71751"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,739.667,-328.128)" /></g><g
|
||||
style="display:inline"
|
||||
id="compassApp"
|
||||
inkscape:label="#g3124"
|
||||
|
@ -1367,32 +1379,44 @@
|
|||
<g
|
||||
id="gsGroup"
|
||||
transform="matrix(0,-1,1,0,746.592,1646.26)"
|
||||
inkscape:label="#g4160"><circle
|
||||
style="display:inline;fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
inkscape:label="#g4160"><path
|
||||
sodipodi:type="arc"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
|
||||
id="path3951-5"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,1048.27,-640.211)"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /><circle
|
||||
sodipodi:cx="380.07"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:ry="6.71751"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,1048.27,-640.211)" /><path
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,1123.83,-640.211)"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
sodipodi:ry="6.71751"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:cx="380.07"
|
||||
id="path3953-2"
|
||||
style="display:inline;fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /><circle
|
||||
style="display:inline;fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
|
||||
sodipodi:type="arc" /><path
|
||||
sodipodi:type="arc"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
|
||||
id="path3955-3"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,1274.73,-640.211)"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /><circle
|
||||
sodipodi:cx="380.07"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:ry="6.71751"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,1274.73,-640.211)" /><path
|
||||
transform="matrix(0.968853,0.690717,-0.690717,0.968853,1350.58,-640.21)"
|
||||
d="m 386.788,643.93 a 6.71751,6.71751 0 1 1 -13.436,0 6.71751,6.71751 0 1 1 13.436,0 z"
|
||||
sodipodi:ry="6.71751"
|
||||
sodipodi:rx="6.71751"
|
||||
sodipodi:cy="643.93"
|
||||
sodipodi:cx="380.07"
|
||||
id="path3959-1"
|
||||
style="display:inline;fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
cx="380.07"
|
||||
cy="643.93"
|
||||
r="6.71751" /><path
|
||||
style="fill:none;stroke:#ededed;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:none;stroke:#ededed;stroke-width:4.202175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
|
||||
sodipodi:type="arc" /><path
|
||||
style="fill:none;stroke:#ededed;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 1002.5,521.001 -19.001,0"
|
||||
id="path4166"
|
||||
inkscape:connector-curvature="0"
|
||||
|
@ -1822,4 +1846,4 @@
|
|||
id="tspan3209"
|
||||
sodipodi:role="line"
|
||||
style="text-align:center;text-anchor:middle">99</tspan></text>
|
||||
</g></svg>
|
||||
</g></svg>
|
||||
|
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 127 KiB |
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
varying vec4 cloudColor;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, May 2014
|
||||
// based on ALS terrain shader
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D color_tex;
|
||||
uniform sampler2D ao_tex;
|
||||
uniform sampler2D normal_tex;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform sampler2D texture;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D color_tex;
|
||||
uniform sampler2D spec_emis_tex;
|
||||
void main() {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D input_tex;
|
||||
uniform vec2 fg_BufferSize;
|
||||
uniform float blurOffset_x;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D lighting_tex;
|
||||
uniform sampler2D bloom_tex;
|
||||
uniform sampler2D film_tex;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
|
||||
varying float fogFactor;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#version 120
|
||||
#extension GL_EXT_gpu_shader4 : enable
|
||||
// -*- mode: C; -*-
|
||||
// Licence: GPL v2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#version 120
|
||||
#extension GL_EXT_gpu_shader4 : enable
|
||||
//
|
||||
// attachment 0: normal.x | normal.x | normal.y | normal.y
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D lighting_tex;
|
||||
uniform sampler2D bloom_tex;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D depth_tex;
|
||||
uniform sampler2D normal_tex;
|
||||
uniform sampler2D color_tex;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*- mode: C; -*-
|
||||
#version 120
|
||||
// Licence: GPL v2
|
||||
// Author: Frederic Bouvier.
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*- mode: C; -*-
|
||||
#version 120
|
||||
// Licence: GPL v2
|
||||
// Author: Frederic Bouvier.
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
varying vec2 rawPos;
|
||||
varying vec2 nPos;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform float air_pollution;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
//#define fog_FuncTION
|
||||
//varying vec3 PointPos;
|
||||
|
||||
|
@ -13,4 +15,4 @@ vec3 fog_Func(vec3 color, int type)
|
|||
fogFactor=1.0;
|
||||
|
||||
return mix(gl_Fog.color.rgb, color, fogFactor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform sampler2D texture;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform vec2 fg_BufferSize;
|
||||
uniform vec3 fg_Planes;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform vec2 fg_BufferSize;
|
||||
uniform vec3 fg_Planes;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
//
|
||||
|
@ -71,4 +72,4 @@ void main()
|
|||
// gl_FragColor = mix(gl_Fog.color, fragColor, fogFactor);
|
||||
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
||||
gl_FragColor = fragColor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform float eyerel_x1;
|
||||
uniform float eyerel_y1;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// Shader for use with material animations
|
||||
varying vec4 diffuse, constantColor, matSpecular;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
varying vec4 diffuse_term;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2015
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2015
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
// Night vision effect inspired by http://www.geeks3d.com/20091009/shader-library-night-vision-post-processing-filter-glsl/
|
||||
|
||||
uniform sampler2D color_tex;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
varying vec3 hazeColor;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,89 +1,90 @@
|
|||
// -*-C++-*-
|
||||
|
||||
uniform int display_xsize;
|
||||
uniform int display_ysize;
|
||||
uniform float field_of_view;
|
||||
uniform float view_pitch_offset;
|
||||
uniform float view_heading_offset;
|
||||
|
||||
float light_distance_fading(in float dist)
|
||||
{
|
||||
return min(1.0, 10000.0/(dist*dist));
|
||||
}
|
||||
|
||||
float fog_backscatter(in float avisibility)
|
||||
{
|
||||
return 0.5* min(1.0,10000.0/(avisibility*avisibility));
|
||||
}
|
||||
|
||||
|
||||
|
||||
vec3 searchlight()
|
||||
{
|
||||
|
||||
vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.4);
|
||||
|
||||
float headlightIntensity;
|
||||
float lightRadius = (float(display_xsize) *9.16 /field_of_view);
|
||||
float angularDist = length(gl_FragCoord.xy -center);
|
||||
|
||||
if (angularDist < lightRadius)
|
||||
{
|
||||
headlightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0);
|
||||
//headlightIntensity = headlightIntensity *
|
||||
//headlightIntensity*= clamp(1.0 + 0.15 * log(1000.0/(dist*dist)),0.0,1.0);
|
||||
return headlightIntensity * vec3 (0.5,0.5, 0.5);
|
||||
}
|
||||
else return vec3 (0.0,0.0,0.0);
|
||||
}
|
||||
|
||||
vec3 flashlight(in vec3 color, in float radius)
|
||||
{
|
||||
|
||||
vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.4);
|
||||
|
||||
float headlightIntensity;
|
||||
float lightRadius = (float(display_xsize) *radius /field_of_view);
|
||||
float angularDist = length(gl_FragCoord.xy -center);
|
||||
|
||||
if (angularDist < lightRadius)
|
||||
{
|
||||
headlightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0);
|
||||
return headlightIntensity * color;
|
||||
}
|
||||
else return vec3 (0.0,0.0,0.0);
|
||||
}
|
||||
|
||||
vec3 landing_light(in float offset, in float offsetv)
|
||||
{
|
||||
|
||||
float fov_h = field_of_view;
|
||||
float fov_v = float(display_ysize)/float(display_xsize) * field_of_view;
|
||||
|
||||
float yaw_offset;
|
||||
|
||||
if (view_heading_offset > 180.0)
|
||||
{yaw_offset = -360.0+view_heading_offset;}
|
||||
else
|
||||
{yaw_offset = view_heading_offset;}
|
||||
|
||||
float x_offset = (float(display_xsize) / fov_h * (yaw_offset + offset));
|
||||
float y_offset = -(float(display_ysize) / fov_v * (view_pitch_offset + offsetv));
|
||||
|
||||
vec2 center = vec2 (float(display_xsize) * 0.5 + x_offset, float(display_ysize) * 0.4 + y_offset);
|
||||
|
||||
|
||||
|
||||
float landingLightIntensity;
|
||||
float lightRadius = (float(display_xsize) *9.16 /field_of_view);
|
||||
float angularDist = length(gl_FragCoord.xy -center);
|
||||
|
||||
if (angularDist < lightRadius)
|
||||
{
|
||||
landingLightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0);
|
||||
//landingLightIntensity *= min(1.0, 10000.0/(dist*dist));
|
||||
return landingLightIntensity * vec3 (0.5,0.5, 0.5);
|
||||
}
|
||||
else return vec3 (0.0,0.0,0.0);
|
||||
|
||||
}
|
||||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform int display_xsize;
|
||||
uniform int display_ysize;
|
||||
uniform float field_of_view;
|
||||
uniform float view_pitch_offset;
|
||||
uniform float view_heading_offset;
|
||||
|
||||
float light_distance_fading(in float dist)
|
||||
{
|
||||
return min(1.0, 10000.0/(dist*dist));
|
||||
}
|
||||
|
||||
float fog_backscatter(in float avisibility)
|
||||
{
|
||||
return 0.5* min(1.0,10000.0/(avisibility*avisibility));
|
||||
}
|
||||
|
||||
|
||||
|
||||
vec3 searchlight()
|
||||
{
|
||||
|
||||
vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.4);
|
||||
|
||||
float headlightIntensity;
|
||||
float lightRadius = (float(display_xsize) *9.16 /field_of_view);
|
||||
float angularDist = length(gl_FragCoord.xy -center);
|
||||
|
||||
if (angularDist < lightRadius)
|
||||
{
|
||||
headlightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0);
|
||||
//headlightIntensity = headlightIntensity *
|
||||
//headlightIntensity*= clamp(1.0 + 0.15 * log(1000.0/(dist*dist)),0.0,1.0);
|
||||
return headlightIntensity * vec3 (0.5,0.5, 0.5);
|
||||
}
|
||||
else return vec3 (0.0,0.0,0.0);
|
||||
}
|
||||
|
||||
vec3 flashlight(in vec3 color, in float radius)
|
||||
{
|
||||
|
||||
vec2 center = vec2 (float(display_xsize) * 0.5, float(display_ysize) * 0.4);
|
||||
|
||||
float headlightIntensity;
|
||||
float lightRadius = (float(display_xsize) *radius /field_of_view);
|
||||
float angularDist = length(gl_FragCoord.xy -center);
|
||||
|
||||
if (angularDist < lightRadius)
|
||||
{
|
||||
headlightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0);
|
||||
return headlightIntensity * color;
|
||||
}
|
||||
else return vec3 (0.0,0.0,0.0);
|
||||
}
|
||||
|
||||
vec3 landing_light(in float offset, in float offsetv)
|
||||
{
|
||||
|
||||
float fov_h = field_of_view;
|
||||
float fov_v = float(display_ysize)/float(display_xsize) * field_of_view;
|
||||
|
||||
float yaw_offset;
|
||||
|
||||
if (view_heading_offset > 180.0)
|
||||
{yaw_offset = -360.0+view_heading_offset;}
|
||||
else
|
||||
{yaw_offset = view_heading_offset;}
|
||||
|
||||
float x_offset = (float(display_xsize) / fov_h * (yaw_offset + offset));
|
||||
float y_offset = -(float(display_ysize) / fov_v * (view_pitch_offset + offsetv));
|
||||
|
||||
vec2 center = vec2 (float(display_xsize) * 0.5 + x_offset, float(display_ysize) * 0.4 + y_offset);
|
||||
|
||||
|
||||
|
||||
float landingLightIntensity;
|
||||
float lightRadius = (float(display_xsize) *9.16 /field_of_view);
|
||||
float angularDist = length(gl_FragCoord.xy -center);
|
||||
|
||||
if (angularDist < lightRadius)
|
||||
{
|
||||
landingLightIntensity = pow(cos(angularDist/lightRadius * 1.57075),2.0);
|
||||
//landingLightIntensity *= min(1.0, 10000.0/(dist*dist));
|
||||
return landingLightIntensity * vec3 (0.5,0.5, 0.5);
|
||||
}
|
||||
else return vec3 (0.0,0.0,0.0);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform mat4 fg_ViewMatrix;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform sampler2D normal_tex;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform mat4 fg_ViewMatrix;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform sampler2D normal_tex;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform sampler2D texture;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
// Ambient term comes in gl_Color.rgb.
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
uniform sampler2D texture;
|
||||
|
||||
////fog "include" /////
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 120
|
||||
|
||||
uniform sampler2D baseTexture;
|
||||
varying float fogFactor;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Texture switching based on face slope and snow level
|
||||
// based on earlier work by Frederic Bouvier, Tim Moore, and Yves Sablonier.
|
||||
// <20> Emilian Huminiuc 2011
|
||||
|
||||
#version 120
|
||||
|
||||
varying float RawPosZ;
|
||||
varying vec3 WorldPos;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// -*-C++-*-
|
||||
#version 120
|
||||
|
||||
// written by Thorsten Renk, Oct 2011, based on default.frag
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// -*-C++-*-
|
||||
|
||||
#version 120
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue