XNA Creators Club Online
Page 1 of 1 (2 items)
Sort Posts: Previous Next

COLOR syntax of pixel shader

Last post 04-21-2008 1:05 PM by David Hunt. 1 replies.
  • 04-21-2008 12:25 PM

    COLOR syntax of pixel shader

    COLOR syntax of pixel shader

    If I use the "return 0.7f", it means what value of color?
    float4(0,0,0.7f,1.0f) or float4(0.7f,0.7f,0.7f,0.7f)?
    Somebody know where the reule and value of color definition(:COLOR) of pixel shader in MSDN?

    float4 c1=0.5f; the value is equal to the value of float4(0.5f,0.5f,0.5f,0.5f)?

    1
    2
    3
    4
    5
    float4 UpdateShadowResultTextureForDeferredShadingPS(Ps_TC_IN IN) : COLOR
    {
    return 0.7;
    return float4(0,0,0.7f,1.0f);
    }
  • 04-21-2008 1:05 PM In reply to

    Re: COLOR syntax of pixel shader

    This is documented here.

    float4 myVector = 0.7f results in {0.7f,0.7f,0.7f,0.7f}.

    It's not specific to the symantics (e.g. COLOR, POSITION, etc.). It's the way vectors are handled.

     

     

Page 1 of 1 (2 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG