--
[ Picked text/plain from multipart/alternative ]
I've been having a bit of problem with getting the depth from vertex shader
to be used by the pixel shader. I am looking to make a shader that fades to
black and white the further away the pixels are.

I've tried using the input semantic float Depth : DEPTH for the vertex
shader then for now I set the alpha of the texture to 1 if its beyond 312
units and otherwise the alpha is 0. Then in the pixel shader I just am for
now setting the pixels that have alpha in the color of 1.0 to red and the
rest are un touched.

I've also tried using the position and multiplying it by the cModelView
matrix and then taking the Z coord from that XYZW point and passing it the
same way.

Any help is appreciated.


Also I am using it on a full scene shader that is being applied near the end
of renderview()
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to