Erik Hofman wrote:
Tim Moore wrote:
> I've eliminated some varying parameters from the landmass vertex and
geometry shaders. Please give it a try and see if it works better.
Yes this works for me, excellent!
If I do the same kind of thing to landmass.vert/frag using this patch I
also get back the settings below quality level=3.5
It's just a matter of moving one (seemingly unused) 'varying float' to
landmass.frag
Erik
Index: landmass.frag
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Shaders/landmass.frag,v
retrieving revision 1.8
diff -p -u -r1.8 landmass.frag
--- landmass.frag 10 Apr 2010 15:09:18 -0000 1.8
+++ landmass.frag 30 Apr 2010 16:38:00 -0000
@@ -7,7 +7,6 @@ varying vec3 VTangent;
varying vec3 VBinormal;
varying vec3 Normal;
varying vec4 constantColor;
-varying float bump;
uniform sampler3D NoiseTex;
uniform sampler2D BaseTex;
@@ -55,12 +54,14 @@ float ray_intersect(sampler2D reliefMap,
void main (void)
{
+ float bump = 1.0;
+
if ( quality_level >= 3.5 ) {
linear_search_steps = 20;
}
- vec2 uv, dp, ds;
+ vec2 uv, dp = vec2(0, 0), ds = vec2(0, 0);
vec3 N;
- float d;
+ float d = 0;
if ( bump > 0.9 && quality_level >= 2.0 )
{
vec3 V = normalize(ecPosition.xyz);
Index: landmass.vert
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Shaders/landmass.vert,v
retrieving revision 1.5
diff -p -u -r1.5 landmass.vert
--- landmass.vert 2 Apr 2010 07:06:40 -0000 1.5
+++ landmass.vert 30 Apr 2010 16:38:00 -0000
@@ -5,7 +5,6 @@ varying vec3 VTangent;
varying vec3 VBinormal;
varying vec3 Normal;
varying vec4 constantColor;
-varying float bump;
attribute vec3 tangent;
attribute vec3 binormal;
@@ -18,7 +17,6 @@ void main(void)
VNormal = gl_NormalMatrix * gl_Normal;
VTangent = gl_NormalMatrix * tangent;
VBinormal = gl_NormalMatrix * binormal;
- bump = 1.0;
gl_FrontColor = gl_Color;
constantColor = gl_FrontMaterial.emission
------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel