From a135650086ebd3b2f627838448ae46fcf0d7c3a7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 2 Sep 2006 14:27:42 +0000 Subject: [PATCH] Added setting of position.w to 1.0 and removed zscale hack. --- examples/osgshaderterrain/osgshaderterrain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/osgshaderterrain/osgshaderterrain.cpp b/examples/osgshaderterrain/osgshaderterrain.cpp index 6ee3b8289..6a20aff43 100644 --- a/examples/osgshaderterrain/osgshaderterrain.cpp +++ b/examples/osgshaderterrain/osgshaderterrain.cpp @@ -579,8 +579,8 @@ osg::Node* ForestTechniqueManager::createScene(unsigned int /*numTreesToCreates* " vec4 position;\n" " position.x = gl_Vertex.x;\n" " position.y = gl_Vertex.y;\n" - " float zscale = 0.99;\n" - " position.z = texture2D(terrainTexture, texcoord).r * zscale;\n" + " position.z = texture2D(terrainTexture, texcoord).r;\n" + " position.w = 1.0;\n" " \n" " gl_Position = gl_ModelViewProjectionMatrix * position;\n" " gl_FrontColor = vec4(1.0,1.0,1.0,1.0);\n"