5 #include "AssetEntity.h" 6 #include "LightManager.h" 7 #include "ParameterBlock.h" 8 #include "EffectFileHandles.h" 9 #include "IObjectScriptingInterface.h" 22 const static int MAX_EFFECT_LIGHT_NUM = 4;
30 TechCategory_default = 0,
47 k_worldViewProjMatrix,
52 k_TexWorldViewProjMatrix,
59 k_ambientMaterialColor,
60 k_diffuseMaterialColor,
61 k_emissiveMaterialColor,
62 k_specularMaterialColor,
63 k_specularMaterialPower,
78 k_atmosphericLighting,
192 virtual AssetType GetType(){
return effectfile;};
195 virtual HRESULT InitDeviceObjects(){
return S_OK; };
196 virtual HRESULT RestoreDeviceObjects(){
return S_OK; };
197 virtual HRESULT InvalidateDeviceObjects(){
return S_OK; };
198 virtual HRESULT DeleteDeviceObjects(){
return S_OK; };
203 static void EnableTextures(
bool bEnable){};
204 static bool AreTextureEnabled(){
return true; };
206 int totalPasses()
const {
return 0; };
214 void applyCameraMatrices() {};
215 void applyWorldMatrices() {};
216 void applyFogParameters(
bool bEnableFog,
const Vector4* fogParam,
const LinearColor* fogColor) {};
217 void applyGlobalLightingData(
CSunLight& sunlight) {};
219 bool setParameter(
eParameterHandles index,
const void* data, int32 size = D3DX_DEFAULT) {
return false; };
228 HRESULT SetRawValue(
const char* hParameter,
const void* pData, uint32 ByteOffset, uint32 Bytes) {
return S_OK; };
229 bool SetBool(
const char* hParameter, BOOL bBoolean) {
return false; };
230 bool SetInt(
const char* hParameter,
int nValue) {
return false; };
231 bool SetFloat(
const char* hParameter,
float fValue) {
return false; };
232 bool SetVector2(
const char* hParameter,
const Vector2& vValue) {
return false; };
233 bool SetVector3(
const char* hParameter,
const Vector3& vValue) {
return false; };
234 bool SetVector4(
const char* hParameter,
const Vector4& vValue) {
return false; };
235 bool SetMatrix(
const char* hParameter,
const Matrix4& data) {
return false; };
241 bool setTexture(
int index,
TextureEntity* data) {
return false; };
242 bool setTexture(
int index, DeviceTexturePtr_type pTex) {
return false; };
244 bool SetBoolean(
int nIndex,
bool value) {
return false; };
246 bool begin(
bool bApplyParam =
true, DWORD flag = 0) {
return false; };
247 bool BeginPass(
int pass,
bool bForceBegin =
false) {
return false; };
248 void CommitChanges() {};
249 void EndPass(
bool bForceEnd =
false) {};
250 void end(
bool bForceEnd =
false) {};
252 bool LoadBuildinShader() {
return true; };
317 #ifdef USE_DIRECTX_RENDERER 318 #include "effect_file_DirectX.h" 319 #elif defined(USE_OPENGL_RENDERER) 320 #include "effect_file_OpenGL.h" Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
eParameterHandles
Definition: effect_file.h:41
boolean constants are for static branching,
Definition: effect_file.h:111
bool SetTechniqueByIndex(int nIndex)
Set technique if it is different from the current one.
Definition: effect_file.h:309
a technique description
Definition: effect_file.h:179
4-dimensional homogeneous vector.
Definition: ParaVector4.h:10
void SetFileName(const std::string &filename)
set inner file name, usually at the load time.
Definition: effect_file.h:201
AssetType
each asset type has a unique asset type number
Definition: AssetEntity.h:82
different physics engine has different winding order.
Definition: EventBinding.h:32
TechniqueCategory
The game engine will identified some predefined technique name from the the effect file...
Definition: effect_file.h:27
Modeling the global sun and its directional light, including sun position, direction, color, time of day, etc.
Definition: SunLight.h:26
void releaseEffect(int nPass=-1)
Definition: effect_file.h:257
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
technique name is "GenShadowMap"
Definition: effect_file.h:32
bool EnableReflectionMapping(bool bEnable, float fSurfaceHeight=0.f)
enable reflection mapping
Definition: effect_file.h:271
void applySurfaceMaterial(const ParaMaterial *pSurfaceMaterial, bool bUseGlobalAmbient=true)
Definition: effect_file.h:213
float4(fog_start, fog_range, fogDensity, reserved)
Definition: effect_file.h:90
technique name is "DetailCharacter"
Definition: effect_file.h:36
Standard 2-dimensional vector.
Definition: ParaVector2.h:16
bool SetFirstValidTechniqueByCategory(TechniqueCategory nCat)
Set technique if it is different from the current one.
Definition: effect_file.h:302
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
Definition: RenderCore.h:50
void EnableSunLight(bool bEnableSunLight)
whether to enable sun light calculation
Definition: effect_file.h:209
Definition: enum_maker.hpp:46
Definition: effect_file.h:323
const TechniqueDesc * GetCurrentTechniqueDesc()
get the current technique description.
Definition: effect_file.h:311
void EnableLightMap(bool bEnable)
whether to enable the use of light map
Definition: effect_file.h:288
bool EnableEnvironmentMapping(bool bEnable)
enable environment mapping
Definition: effect_file.h:264
void EnableAlphaBlending(bool bAlphaBlending)
whether to enable alpha blending in shader.
Definition: effect_file.h:291
technique name is "Character"
Definition: effect_file.h:34
Definition: IObjectScriptingInterface.h:6
std::string AssetKey
the unique key object for asset entity.
Definition: AssetEntity.h:13
technique name is "Vegetation"
Definition: effect_file.h:38
A linear, 32-bit/component floating point RGBA color.
Definition: ParaColor.h:12
void EnableAlphaTesting(bool bAlphaTesting)
whether to enable alpha testing
Definition: effect_file.h:294
void SetReflectFactor(float fFactor)
set shader parameter "reflectFactor"
Definition: effect_file.h:277
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25
a list of CParameter{name, value} pairs of anything.
Definition: ParameterBlock.h:108
void EnableNormalMap(bool bEnable)
whether to enable the use of normal map
Definition: effect_file.h:282
asset entity: CEffectFile
Definition: effect_file.h:19