<?xml version="1.0" encoding="utf-8" ?> 
<!--
  Copyright (C) 2007-2008 by Frank Richter
	    (C) 2007 by Jorrit Tyberghein

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public
  License along with this library; if not, write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-->
<shader compiler="shaderweaver" name="z_only">
  <technique priority="200">
    <pass>
      <combiner plugin="crystalspace.graphics3d.shader.combiner.glcg" />

      <mixmode>
	  <alphatest>disable</alphatest>
      </mixmode>
      <writemask r="false" g="false" b="false" a="false" />

      <snippet id="position" file="/shader/snippets/position-noclip.xml" />
      <snippet id="rgbaout" file="/shader/snippets/shadow/fragment-depth.xml" />
    </pass>
  </technique>
</shader>


<?xml version="1.0" encoding="utf-8" ?> 
<!--
  Copyright (C) 2007-2008 by Frank Richter
	    (C) 2007 by Jorrit Tyberghein

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public
  License along with this library; if not, write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-->
<shader compiler="shaderweaver" name="z_only">
  <technique priority="200">
    <pass>
      <combiner plugin="crystalspace.graphics3d.shader.combiner.glcg" />

      <mixmode>
	  <alphatest>disable</alphatest>
      </mixmode>
      <writemask r="false" g="false" b="false" a="false" />

      <snippet id="position" file="/shader/snippets/position.xml" />
      <snippet id="rgbaout" file="/shader/snippets/shadow/fragment-depth.xml" />
    </pass>
  </technique>
</shader>


Make the early Z shader respect clipping. Avoids artifacts not unlike Z-fighting which occur due slight differences in depth values when mixing clipped and unclipped positions, visible in water.zip.
Make the early Z shader respect clipping.
Avoids artifacts not unlike Z-fighting which occur due slight differences in depth values when mixing clipped and unclipped positions, visible in water.zip.

git-svn-id: 28d9401aa571d5108e51b194aae6f24ca5964c06@32107 8cc4aa7f-3514-0410-904f-f2cc9021211c
