开发者

HLSL declaring a pass with angle brackets containing values

开发者 https://www.devze.com 2022-12-08 23:30 出处:网络
In the directx post process sample the downfilter FX has the following code in it: //-----------------------------------------------------------------------------

In the directx post process sample the downfilter FX has the following code in it:

//-----------------------------------------------------------------------------
// Technique: PostProcess
// Desc: Performs post-processing effect that down-filters.
//-----------------------------------------------------------------------------
technique PostProcess
{
    pass p0
    <
        float fScaleX = 0.25f;
        float fScaleY = 0.25f;
    >
    {
        VertexShader = null;
        PixelShader = compile ps_2_0 DownFilter();
        ZEnable = false;
    }
}

I'm just curious, the pass is declared with angle bracket开发者_StackOverflows and those two float values. What does it do exactly?


The items in the angle brackets are annotations:

"user-supplied information (metadata) that is ignored by the effect system" [ http://msdn.microsoft.com/en-us/library/ee415626%28VS.85%29.aspx ]


The nVidia article on Using Annoations and Semantics is also a good read for this.

0

精彩评论

暂无评论...
验证码 换一张
取 消