public GpuParticleShader(ParticleSystemCompiledShaderData pixelShaderData)
		{
			this.fxb = pixelShaderData.CompressedShaderCode;

			this.colourSamplerIndex = pixelShaderData.ColourSamplerIndex;
			this.userSamplerIndex = pixelShaderData.UserSamplerIndex;
			this.lifeSamplerIndex = pixelShaderData.LifeSamplerIndex;

			this.spawnIndices = new Dictionary<ParticleSpawnValues, float>(new ParticleSpawnValues.ParticleSpawnValuesComparer());
			this.psConstants = new Vector4[6];
		}
		/// <summary></summary>
		/// <param name="onceShaderData"></param>
		/// <param name="onceCloneShaderData"></param>
		/// <param name="frameShaderData"></param>
		/// <param name="frameMoveShaderData"></param>
		public GpuParticleProcessorData(ParticleSystemCompiledShaderData onceShaderData, ParticleSystemCompiledShaderData onceCloneShaderData, ParticleSystemCompiledShaderData frameShaderData, ParticleSystemCompiledShaderData frameMoveShaderData)
		{
			this.OnceShaderData = onceShaderData;
			this.OnceCloneShaderData = onceCloneShaderData;
			this.FrameShaderData = frameShaderData;
			this.FrameMoveShaderData = frameMoveShaderData;

			this.onceShader = new GpuParticleShader(this.OnceShaderData);
			this.onceCloneShader = new GpuParticleShader(this.OnceCloneShaderData);
			this.frameShader = new GpuParticleShader(this.FrameShaderData);
			this.frameMoveShader = new GpuParticleShader(this.FrameMoveShaderData);
		}
Пример #3
0
        /// <summary></summary>
        /// <param name="onceShaderData"></param>
        /// <param name="onceCloneShaderData"></param>
        /// <param name="frameShaderData"></param>
        /// <param name="frameMoveShaderData"></param>
        public GpuParticleProcessorData(ParticleSystemCompiledShaderData onceShaderData, ParticleSystemCompiledShaderData onceCloneShaderData, ParticleSystemCompiledShaderData frameShaderData, ParticleSystemCompiledShaderData frameMoveShaderData)
        {
            this.OnceShaderData      = onceShaderData;
            this.OnceCloneShaderData = onceCloneShaderData;
            this.FrameShaderData     = frameShaderData;
            this.FrameMoveShaderData = frameMoveShaderData;

            this.onceShader      = new GpuParticleShader(GpuVertexShaderData.VS_ONCE, this.OnceShaderData);
            this.onceCloneShader = new GpuParticleShader(GpuVertexShaderData.VS_ONCE_CLONE, this.OnceCloneShaderData);
            this.frameShader     = new GpuParticleShader(GpuVertexShaderData.VS_FRAME, this.FrameShaderData);
            this.frameMoveShader = new GpuParticleShader(GpuVertexShaderData.VS_ONCE_CLONE, this.FrameMoveShaderData);
        }