Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Apr 2012
Offline Last Active Jul 01 2013 07:32 PM

Topics I've Started

Initializing particles in a particle system

24 May 2013 - 12:32 AM

Hi everyone.

I am working on a particle system with HLSL on XNA Framework. The properties of the particles are stored in several textures. Now I find it hard to initialize a particle(set its property at the beginning or reset its property when it is added to the stage again). It is not easy to get a random number in HLSL and setting the color of a single pixel(to reset the property of a new-added particle) in a texture is inconvenient.So are there any other good solutions?


how to loop the ogg sound in XNA with the library 'OGGSharp'?

01 February 2013 - 06:32 AM

Hi everybody~

My English is not good, so I may describe the problem not so clearly, but I will try my best...

I am now trying to play ogg sound in XNA.OGGSharp maybe a good choice but I don't know how to loop the sound(or repeat playing the sound?).In addition, I heard that there are tags in ogg files to tell when to start/end the loop, but I don't know where they are stored in the file.I looked into the code of OGGSharp and found there are some data read and stored from the ogg file.But I am not familiar with the structure of the file so I don't know what to get.

Here is the source code of OGGSharp


Thank you~~

need help with "There was an error compiling expression"

25 April 2012 - 06:30 AM

hi everybody..i am a beginner to HLSL and i met with a problem that the compiler says 'There was an error compiling expression'.
here is some of the code
float4 PassTest(float2 coord:TEXCOORD) : COLOR0
    return float4(0, 0, 0, 0);
technique Main

    pass P0
  PixelShader = compile ps_2_0 PassTest();  //the error is in this line?
i do not know what may cause this..and some HLSL code written before can work well...
my English is poor ,so if it is not described clearly enough, please point out...thanks.~