Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.h	(revision 3045)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.h	(revision 3047)
@@ -55,10 +55,14 @@
 	Technique();
 
-	Technique(const Technique &tech);
-
 	~Technique();
 	/** Sets ambient and diffuse color to color
 	*/
 	Technique(const RgbaColor &color);
+	/** Renders this technique.
+	*/
+	void Render(RenderState *state);
+	/** Initialize this technique material with default values
+	*/
+	void Init();
 
 	inline Texture *GetTexture() const { return mTexture; }
@@ -81,10 +85,10 @@
 	inline bool IsAlphaTestEnabled() const { return mAlphaTestEnabled; } 
 	inline bool IsCullFaceEnabled() const { return mCullFaceEnabled; } 
-	/** Renders this technique.
-	*/
-	void Render(RenderState *state);
-	/** Initialize the material with default values
-	*/
-	void InitMaterial();
+
+	inline void SetLightingEnabled(bool l) { mLightingEnabled = l; }
+	inline void SetColorWriteEnabled(bool c) { mColorWriteEnabled = c; }
+
+	inline bool IsLightingEnabled() const { return mLightingEnabled; } 
+	inline bool IsColorWriteEnabled() const { return mColorWriteEnabled; } 
 
 	void SetFragmentProgram(ShaderProgram *p);
@@ -94,10 +98,9 @@
 	ShaderProgram *GetVertexProgram() { return mVertexProgram; }
 
-	//void SetFragmentProgramParameters(const GPUProgramParameters &p) { mGPUFragmentParameters = p; }
-	//void SetVertexProgramParameters(const GPUProgramParameters &p) { mGPUVertexParameters = p; }
-
-	/** Each technique has a distict set of parameters.
+	/** Get the set of fragment parameters of this technique
 	*/
 	GPUProgramParameters * const GetFragmentProgramParameters() { return &mFragmentProgramParameters; }
+	/**  Get the set of vertex parameters of this technique
+	*/
 	GPUProgramParameters * const GetVertexProgramParameters() { return &mVertexProgramParameters; }
 
@@ -122,4 +125,8 @@
 	ShaderProgram *mFragmentProgram;
 	ShaderProgram *mVertexProgram;
+	/// if this material can write colors
+	bool mColorWriteEnabled;
+	/// if lighting is used
+	bool mLightingEnabled;
 };
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp	(revision 3043)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.cpp	(revision 3047)
@@ -199,5 +199,5 @@
 	}
 
-	//////////
+	///////////////////
 	//-- fragment and vertex programs
 	
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp	(revision 3046)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp	(revision 3047)
@@ -156,12 +156,14 @@
 
 	///////////
-	//-- hack: add tree animation
+	//-- hack: add tree animation (should be done per material script!)
 
 	if (numLODs > 1)
 	{
-		//for (int i = 0; i < min(numLODs, 2); ++ i)
-		for (int i = 0; i < numLODs; ++ i)
+		ShapeContainer::iterator sstart, send;
+
+		// only use shader for the first two lod levels (the non-billboards)
+		for (int i = 0; i < min(numLODs, 2); ++ i)
+		//for (int i = 0; i < numLODs; ++ i)
 		{
-			ShapeContainer::iterator sstart, send;
 			sceneGeom->GetLODLevel(i, sstart, send);
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.h	(revision 3043)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.h	(revision 3047)
@@ -98,4 +98,7 @@
 	bool mFragmentProgramEnabled;
 	bool mVertexProgramEnabled;
+
+	bool mUseLighting;
+	bool mColorWriteEnabled;
 };
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.cpp	(revision 3045)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.cpp	(revision 3047)
@@ -18,5 +18,5 @@
 
 
-void Technique::InitMaterial()
+void Technique::Init()
 {
 	mTexture = NULL;
@@ -29,4 +29,9 @@
 	mVertexProgram = NULL;
 	mFragmentProgram = NULL;
+
+	/// if this material can write colors
+	mColorWriteEnabled = true;
+	/// if lighting is used
+	bool mLightingEnabled = true;
 }
 
@@ -38,5 +43,5 @@
 mEmmisiveColor(RgbaColor(.0f, .0f, .0f, 1.0f))
 {
-	InitMaterial();
+	Init();
 }
 
@@ -48,26 +53,7 @@
 mTexture(NULL)
 {
-	InitMaterial();
+	Init();
 }
 
-
-Technique::Technique(const Technique &tech)
-{
-	mAmbientColor = tech.mAmbientColor;
-	mDiffuseColor = tech.mDiffuseColor;
-	mSpecularColor = tech.mSpecularColor;
-	mEmmisiveColor = tech.mEmmisiveColor;
-
-	mVertexProgram = tech.mVertexProgram;
-	mFragmentProgram = tech.mFragmentProgram;
-
-	mAlphaTestEnabled = tech.mAlphaTestEnabled;
-	mCullFaceEnabled =tech.mCullFaceEnabled;
-
-	mTexture = tech.mTexture;
-
-	mVertexProgramParameters = tech.mVertexProgramParameters;
-	mFragmentProgramParameters = tech.mFragmentProgramParameters;
-}
 
 
