Jump to content
  • Advertisement
Sign in to follow this  
repka3

Problem with fire particle effect

This topic is 3079 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

Hi, this is my first particle effect, and i have some problems to achieve the fire effect. peffect and from shader fx:
 technique psCampfireTech
{
    pass P0
    {
        vertexShader = compile vs_2_0 CampfireVS();
        pixelShader  = compile ps_2_0 CampfirePS();
        
        PointSpriteEnable = true;
        AlphaBlendEnable = true;
	    SrcBlend     = One;
	    DestBlend    = One;
	   //SrcBlend     = SrcAlpha; //good for smoke
	   // DestBlend    = InvSrcAlpha;//good for smoke
	    	    

	    ZWriteEnable = true;
    }
}

I want the fire to obscure the behind objects when is intense, but if i put zwrite enabled the effect is horrible. Do you have some tips for this? Need i to play with blend parameters? Thx for any suggest.

Share this post


Link to post
Share on other sites
Advertisement
You always have to render transparent objects after opaque objects (depth test enabled, depth write false).

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!