#pragma once #include "ParticleSystem.h" #include "Texture.h" #include "Impostor.h" #include #include #include "Scene.h" class AdvancedParticleSystem { public: AdvancedParticleSystem(void); ~AdvancedParticleSystem(void); private: //Impostor to display Impostor m_DisplayImpostor; //Impostor for illuminatoin calculation Impostor m_IllumImpostor; //Display Rendertexture RenderTexture m_DisplayTexture; //Illumination textures RenderTexture m_IllumTexture; //4 textures will be rendered in the 4 AUX buffers using MRT //Depth Texture for appropriate density blending RenderTexture m_FrontDepthTexture; RenderTexture m_BackDepthTexture; RenderTexture m_ObjectsTexture; RenderTexture m_ScatteredIlumTexture; CgProgram m_IllumProgram; CgProgram m_FrontDepthProgram; CgProgram m_DensityOnlyProgram; CgProgram m_DisplayProgram; CgProgram m_Psys_Depth_Multiple_Forward_Program; CgProgram m_TempProg;CgProgram m_TempProg2; CgProgram m_ObjDepthProg; CgProgram m_ScatterIllumProgram; CgProgram m_Psys_Multiple_Forward_Program; CgProgram m_Psys_Single_Phase_Program; CgProgram m_Psys_Depth_Single_Phase_Program; CgProgram m_Psys_Depth_Default_Program; CgProgram m_Psys_Default_Program; Camera m_LightCamera; public: Scene* theScene; bool object_shadows; bool depthcalc; int m_PSys_RenderMode; float albedo; float symmetry;float symmetry2; float transparency; unsigned int PhaseTexID; unsigned int AngleTexID; Vector m_LightColor; ParticleSystem m_ParticleSystem; ParticleSystem m_LittleParticleSystem; //Billboard display texture Texture m_BillboardTexture; Texture m_BbBackDepthTexture; Texture m_BbFrontDepthTexture; void Display(Camera* cam,Vector LightPos); void Refresh(Camera* cam,Vector LightPos,unsigned int Dt,unsigned int TimefromSecond); void RefreshDepths(Camera* cam); void RefreshDepthswithSpheres(Camera* cam); void Initialize(); void InitSystems(); void RenderObjectDepths(Camera* cam); void displayillum(Camera* cam); void displayLittle(Camera* cam); void RefreshIllumTextures(Vector LightPos); void DecreaseAlbedo(){albedo-=0.05;if(albedo<0)albedo=0;} void IncreaseAlbedo(){albedo+=0.05;if(albedo>1)albedo=1;} void DecreaseTransparency(){transparency-=0.05;if(transparency<0)transparency=0;} void IncreaseTransparency(){transparency+=0.05;if(transparency>1)transparency=1;} void DecreaseSymmetry(){symmetry-=0.05;if(symmetry<-1)symmetry=-1;} void IncreaseSymmetry(){symmetry+=0.05;if(symmetry>1)symmetry=1;} };