From: <re...@us...> - 2008-06-30 09:51:38
|
Revision: 30162 http://crystal.svn.sourceforge.net/crystal/?rev=30162&view=rev Author: res2002 Date: 2008-06-30 02:31:13 -0700 (Mon, 30 Jun 2008) Log Message: ----------- Add plane clipping support to furshell shader Modified Paths: -------------- CS/trunk/data/shader/snippets/fur/position-furshell.xml Modified: CS/trunk/data/shader/snippets/fur/position-furshell.xml =================================================================== --- CS/trunk/data/shader/snippets/fur/position-furshell.xml 2008-06-30 02:52:01 UTC (rev 30161) +++ CS/trunk/data/shader/snippets/fur/position-furshell.xml 2008-06-30 09:31:13 UTC (rev 30162) @@ -99,6 +99,13 @@ <varying type="position4" name="position_camera"/> </block> + <block location="cg:clips"> + <!-- Clip for reflection/refraction rendering --> + <clip space="object"> + <plane type="shadervar">clip plane reflection</plane> + </clip> + </block> + <block location="cg:vertexMain"> position_object = Hposition; float furFactor = (totalPasses > 1) ? (float (passNumber)/float (totalPasses-1)) : 0; @@ -106,10 +113,14 @@ position_screen = position = mul (ModelViewProj, position_object); position_camera = mul (ModelView, position_object); position_world = mul (objectToWorld, position_object); + + APPLY_CLIPPING_VP(position_camera, position_world, position_object); </block> <block location="cg:fragmentMain"> position = position_screen; + + APPLY_CLIPPING_FP; </block> <output name="position" type="position4_screen" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |