diff --git a/Shaders/reflect-bump-spec.vert b/Shaders/reflect-bump-spec.vert index 6eb1a68db..a24c94d21 100644 --- a/Shaders/reflect-bump-spec.vert +++ b/Shaders/reflect-bump-spec.vert @@ -1,6 +1,6 @@ // -*- mode: C; -*- // Licence: GPL v2 -// Author: Vivian Meazza. +// © Emilian Huminiuc and Vivian Meazza 2011 varying vec3 rawpos; varying float fogCoord; @@ -19,12 +19,19 @@ uniform mat4 osg_ViewMatrixInverse; attribute vec3 tangent; attribute vec3 binormal; +////fog "include"//////// +uniform int fogType; + +void fog_Func(int type); +///////////////////////// + void main(void) { rawpos = gl_Vertex.xyz / gl_Vertex.w; vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; ecPosition.xyz = ecPosition.xyz / ecPosition.w; fogCoord = ecPosition.z; + fog_Func(fogType); vec3 n = normalize(gl_Normal); vec3 t = cross(gl_Normal, vec3(1.0,0.0,0.0)); diff --git a/Shaders/runway-reflect-bump-spec.frag b/Shaders/runway-reflect-bump-spec.frag index fbf2ce46d..30b6a8db6 100644 --- a/Shaders/runway-reflect-bump-spec.frag +++ b/Shaders/runway-reflect-bump-spec.frag @@ -1,6 +1,6 @@ // -*- mode: C; -*- // Licence: GPL v2 -// Author: Vivian Meazza. +// © Emilian Huminiuc and Vivian Meazza 2011 #version 120 @@ -32,7 +32,13 @@ uniform float ambient_correction; uniform float reflect_map; uniform float normalmap_dds; -uniform int fogType; +//uniform int fogType; + +////fog "include" ///// +uniform int fogType; + +vec3 fog_Func(vec3 color, int type); +////////////////////// vec3 fog_Func(vec3 color, int type);