HLSL - rendering behind near clip plane

Started by
1 comment, last by supagu 16 years, 11 months ago
im trying to get something like this working: http://developer.download.nvidia.com/presentations/2007/gdc/RealTimeFluids.pdf im at the stage where if i go inside my volume, i cant render the volume effect corectly. now, im wondering how to get around the problem. Im thinking i will need to set the pixels depth manually to bring it in front of the near plane so it renders. So i've quickly tried this with no luck: DX10 BTW


struct PSOut
{
	float4	colour	: SV_Target;
	float	depth	: SV_Depth;
};

PSOut PS(PIn IN)
{
	PSOut OUT;

...

OUT.colour = volumeSample;
	OUT.depth = 0;

	return OUT;
}


this seem to have no effect. suggestions on how this may be done?
Advertisement
Is there a good reason you can't just disable depth-testing, as a render-state?

Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
that will still cause fragments behind the near plane to be clipped
but i could turn it off if needed

This topic is closed to new replies.

Advertisement