What is capping?
When you extrude the silhouette edges of a mesh to create a shadow volume you need to put a 'cap' on the end of the extrusion to make a solid (closed) volume. The "cap triangles" are the triangles you need to create after the extrusion to cap the end of the volume.
If you didn't cap the volume then you would get incorrect shadow results when viewed from some angles.
Have a look at this thread.
hope that helps
If you didn't cap the volume then you would get incorrect shadow results when viewed from some angles.
Have a look at this thread.
hope that helps
Hello again, i tried to make capping in a lot of ways, but my best result is this
How can i "turn" the polygones on the right side??
I tried (like a chicken) to add the same polygons used in the first capping but with the -
This code gives me image results.
I tried with the same code, but with - before first mul, but it does not work (and now i understand why)
How can i "turn" the polygones on the right side??
I tried (like a chicken) to add the same polygons used in the first capping but with the -
output.Pos = mul(mul(input[0].Pos,ViewMatrix),ProjMatrix); Stream.Append(output); output.Pos = mul(mul(input[2].Pos,ViewMatrix),ProjMatrix); Stream.Append(output); output.Pos = mul(mul(input[4].Pos,ViewMatrix),ProjMatrix); Stream.Append(output); Stream.RestartStrip(); output.Pos = mul(mul(input[4].Pos + ExtrudeValue * float4(normalize(LightDirection.xyz),0),ViewMatrix),ProjMatrix); Stream.Append(output); output.Pos = mul(mul(input[2].Pos + ExtrudeValue * float4(normalize(LightDirection.xyz),0),ViewMatrix),ProjMatrix); Stream.Append(output); output.Pos = mul(mul(input[0].Pos + ExtrudeValue * float4(normalize(LightDirection.xyz),0),ViewMatrix),ProjMatrix); Stream.Append(output); Stream.RestartStrip();
This code gives me image results.
I tried with the same code, but with - before first mul, but it does not work (and now i understand why)
Why do you pretend to use D3D10 and then fall back to a TNT-era method?
You're asking for D3D10 hardware, use it.
Don't cap. Clamp.
Depth clamping is supported since NV2x and finally makes its appearance as a standard functionality. Capping is no more needed.
You're asking for D3D10 hardware, use it.
Don't cap. Clamp.
Depth clamping is supported since NV2x and finally makes its appearance as a standard functionality. Capping is no more needed.
Hello and thanks for your answer.
I've not understood how and why use depth bias.
I need to cap polygones, but as i've read, DepthBias (mabye for my wrong english) it's only a way to avoid complanar polygons in 3D space.
And so? How can this help me in capping? Could you explain me it?
Anyway, if i would make a test, how should i set
these values?
Thank you.
I've not understood how and why use depth bias.
I need to cap polygones, but as i've read, DepthBias (mabye for my wrong english) it's only a way to avoid complanar polygons in 3D space.
And so? How can this help me in capping? Could you explain me it?
Anyway, if i would make a test, how should i set
INT DepthBias; FLOAT DepthBiasClamp; FLOAT SlopeScaledDepthBias;
these values?
Thank you.
Quote:Original post by XVincentX
I've not understood how and why use depth bias.
I need to cap polygones, but as i've read, DepthBias (mabye for my wrong english) it's only a way to avoid complanar polygons in 3D space.
Neither do I.
Clamping has nothing to deal with bias. The field you're searching is BOOL D3D10_RASTERIZER_DESC::DepthClipEnable.
Just set it to false and activate the raster state. Done.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement