• Advertisement
Sign in to follow this  

COLOR syntax of pixel shader

This topic is 3595 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)?
float4 UpdateShadowResultTextureForDeferredShadingPS(Ps_TC_IN IN) : COLOR
{
	return 0.7;
	return float4(0,0,0.7f,1.0f);
}


Share this post


Link to post
Share on other sites
Advertisement
I'm pretty sure that "return 0.7f" will return "float4(0.7f, 0.7f, 0.7f, 0.7f)". Why don't you try it and find out?

As for the color semantic, it's listed along with the other HLSL semantics here.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement