XNA Creators Club Online
community forums

Search Forums

Page 1 of 22 (213 items) 1 2 3 4 5 Next > ... Last »
  • Re: Alpha blending not working

    Your alpha test is wrong.  Use these settings:            device.RenderState.AlphaBlendEnable = true;            device.RenderState.SourceBlend = Blend.SourceAlpha;            ...
    Posted to XNA Framework (Forum) by Scrogu on 11/05/2008
  • Re: Need help with some simple HLSL code

    As a general rule, if your shader isn't working, go back to an older version that was working, and make smaller changes while making sure that it works after each change.If your shader never functioned, then you should be starting with a simple sample shader that works, and then modifying it towards what you want step by step as per above.This ...
    Posted to XNA Framework (Forum) by Scrogu on 29/04/2008
  • Re: Tile Drawing

    Try these renderstates:            //  enable alpha blending            device.RenderState.AlphaBlendEnable = true;            device.RenderState.SourceBlend = ...
    Posted to Game Algorithms (Forum) by Scrogu on 26/04/2008
  • Re: Generating binormals/bitangents and tangents

    Quasar-  Good clarification.  I assumed that the normal would already be in the vertex format he was using, and the 0,0,1 value was provided as a reference.
    Posted to Game Algorithms (Forum) by Scrogu on 20/04/2008
  • Re: How long is the effective duration of effect state in shader code

    Forever, or until another it is overwritten somewhere else.
    Posted to Direct3D (Forum) by Scrogu on 20/04/2008
  • Re: need help about rotating a sprite

    Yep, converting to vectors and taking the cross product works as well.  You don't actually need to normalize those vectors though.  The result of the Sin/Cos pairs will be unit length anyways, and even if they weren't, it wouldn't affect the sign of the cross products z value.
    Posted to General (Forum) by Scrogu on 20/04/2008
  • Re: Redirect SpriteBatch to render into Texture2D

    Yes, you need to use GraphicsDevice.SetRenderTarget(...) methods.Just search for RenderTarget and you will find lots of samples.
    Posted to XNA Framework (Forum) by Scrogu on 19/04/2008
  • Re: Generic Octree

    Code looks clean and simple.  Looks like your draw method potentially tests for frustum containment twice (if it's not contained) which seems unnecessary.  Tests it once in a Draw method, then tests again in an overloaded call method.The real test of the code though, is does it work for you?Also, the box class seems to be a custom ...
    Posted to Game Algorithms (Forum) by Scrogu on 19/04/2008
  • Re: Please help me i have a problem with rotating sprites

    first determine which turning direction will be the closer.  This pseudo code should do it.  What you're missing is some kind of code to account for the fact that 360 degrees wraps back to 0 and vice versa. float minDelta = 2;   //   minimum angle to bother turningfloat leftDelta = Angle - WantedAngle;if (leftDelta ...
    Posted to Game Algorithms (Forum) by Scrogu on 19/04/2008
  • Re: Generating binormals/bitangents and tangents

    In the content pipeline, there are helper methods to do it, but I'm guessing you're creating your height map at runtime.If you're normal map is applied to your heightmap always in the same x and y directions, then you really don't need to even use binormals/bitangents in your normal map shader.Imagine you have a standard height map like ...
    Posted to Game Algorithms (Forum) by Scrogu on 18/04/2008
Page 1 of 22 (213 items) 1 2 3 4 5 Next > ... Last »
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG