NW4F Eft
Loading...
Searching...
No Matches
nw::eft::ParticleShader Class Reference

#include <eft_Shader.h>

Public Types

enum  UserUniformBlockID { UNIFORM_BLOCK_USER_VERTEX_ID_0 = UNIFORM_BLOCK_ID_MAX , UNIFORM_BLOCK_USER_VERTEX_ID_1 = UNIFORM_BLOCK_ID_MAX + 1 , UNIFORM_BLOCK_USER_FRAGMENT_ID_0 = UNIFORM_BLOCK_ID_MAX + 2 , UNIFORM_BLOCK_USER_FRAGMENT_ID_1 = UNIFORM_BLOCK_ID_MAX + 3 }
enum  UserSamplerSlot {
  USER_SAMPLER_SLOT_0 = 0 , USER_SAMPLER_SLOT_1 = 1 , USER_SAMPLER_SLOT_2 = 2 , USER_SAMPLER_SLOT_3 = 3 ,
  USER_SAMPLER_SLOT_4 = 4 , USER_SAMPLER_SLOT_5 = 5 , USER_SAMPLER_SLOT_6 = 6 , USER_SAMPLER_SLOT_7 = 7 ,
  USER_SAMPLER_SLOT_MAX = 8
}

Public Member Functions

 ParticleShader ()
void Finalize (Heap *heap)
bool SetupShaderResource (Heap *heap, void *shaderResource, u32 shaderResourceSize)
void SetVertexShaderKey (VertexShaderKey *key)
void SetFragmentShaderKey (FragmentShaderKey *key)
void SetGeometryShaderKey (GeometryShaderKey *key)
const VertexShaderKeyGetVertexShaderKey () const
const FragmentShaderKeyGetFragmentShaderKey () const
const GeometryShaderKeyGetGeometryShaderKey () const
bool IsStripe () const
FragmentShaderVariation GetShaderVariation () const
bool IsFragmentSoftEdgeVariation () const
FragmentTextureVariation GetTextureVariation () const
FragmentCombinerTypeVariation GetCombinerTyperVariation () const
FragmentAlphaVariation GetAlphaVariation () const
void InitializeAttribute ()
void InitializeStripeAttribute ()
void InitializeVertexShaderLocation ()
void InitializeStripeVertexShaderLocation ()
void InitializeFragmentShaderLocation ()
void Setup (Heap *heap)
bool IsInitialized () const
void Bind ()
void EnableInstanced ()
void DisableInstanced ()
ShaderGetShaderInst ()
void BindViewUniformBlock (ViewUniformBlock *block)
void BindEmitterStaticUniformBlock (EmitterStaticUniformBlock *block)
void BindEmitterDynamicUniformBlock (EmitterDynamicUniformBlock *block)
s32 GetPositionAttribute () const
s32 GetNormalAttribute () const
s32 GetColorAttribute () const
s32 GetTextureCoordAttribute () const
s32 GetTextureCoordAttribute1 () const
s32 GetIndexAttribute () const
s32 GetRotateAttribute () const
s32 GetColorAttribute0 () const
s32 GetColorAttribute1 () const
s32 GetScaleAttribute () const
s32 GetTexAnimAttribute () const
s32 GetSubTexAnimAttribute () const
s32 GetWolrdPosAttribute () const
s32 GetWolrdPosDiffAttribute () const
s32 GetEmitterMatrix0Attribute () const
s32 GetOuterAttribute () const
s32 GetDirAttribute () const
FragmentTextureLocation GetTextureSamplerLocation (TextureSlot slot) const
FragmentTextureLocation GetFrameBufferTextureSamplerLocation () const
FragmentTextureLocation GetDepthTextureSamplerLocation () const
bool SetUserVertexUniformBlock (UserUniformBlockID uniformBlockID, const char *name, void *param)
bool SetUserFragmentUniformBlock (UserUniformBlockID uniformBlockID, const char *name, void *param)
FragmentTextureLocation GetUserFragmentSamplerLocation (UserSamplerSlot userSamplerSlot, const char *name)
VertexTextureLocation GetUserVertexSamplerLocation (UserSamplerSlot userSamplerSlot, const char *name)

Private Types

enum  {
  UNIFORM_BLOCK_VERTEX_VIEW_BLOCK = 0 , UNIFORM_BLOCK_VERTEX_EMITTER_STATIC_BLOCK = 1 , UNIFORM_BLOCK_VERTEX_EMITTER_DYNAMIC_BLOCK = 2 , UNIFORM_BLOCK_VERTEX_STRIPE_BLOCK = 3 ,
  UNIFORM_BLOCK_FRAGMENT_EMITTER_STATIC_BLOCK = 4 , UNIFORM_BLOCK_FRAGMENTVIEW_BLOCK = 5 , UNIFORM_BLOCK_ID_MAX = 8
}
enum  { DISPLAY_LSIT_SIZE = 512 }

Private Attributes

u8 mDisplayListBuffer [DISPLAY_LSIT_SIZE]
u32 mDisplayListBufferUsed
Shader mShader
VertexShaderKey mVertexShaderKey
FragmentShaderKey mFragmentShaderKey
GeometryShaderKey mGeometryShaderKey
s32 mPositionAttr
s32 mNormalAttr
s32 mColorAttr
s32 mTexCoordAttr0
s32 mTexCoordAttr1
s32 mIndexAttr
s32 mOuterAttr
s32 mDirAttr
FragmentTextureLocation mFragmentTextureSampler [EFT_TEXTURE_SLOT_MAX]
s32 mSclAttr
s32 mTexAnimAttr
s32 mSubTexAnimAttr
s32 mWldPosAttr
s32 mWldPosDfAttr
s32 mColor0Attr
s32 mColor1Attr
s32 vRotAttr
s32 mEmtMatAttr0
s32 mEmtMatAttr1
s32 mEmtMatAttr2
UniformBlock mVertexViewUniformBlock
UniformBlock mFragmentViewUniformBlock
UniformBlock mVertexEmitterStaticUniformBlock
UniformBlock mVertexEmitterDynamicUniformBlock
UniformBlock _56c
UniformBlock mFragmentEmitterStaticUniformBlock
UniformBlock mStripeUniformBlock
UniformBlock mUserVertexUniformBlock [2]
UniformBlock mUserFragmentUniformBlock [2]
VertexTextureLocation mUserVertexSamplerLocation [USER_SAMPLER_SLOT_MAX]
FragmentTextureLocation mUserFragmentSamplerLocation [USER_SAMPLER_SLOT_MAX]

Friends

class Renderer

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
UNIFORM_BLOCK_VERTEX_VIEW_BLOCK 
UNIFORM_BLOCK_VERTEX_EMITTER_STATIC_BLOCK 
UNIFORM_BLOCK_VERTEX_EMITTER_DYNAMIC_BLOCK 
UNIFORM_BLOCK_VERTEX_STRIPE_BLOCK 
UNIFORM_BLOCK_FRAGMENT_EMITTER_STATIC_BLOCK 
UNIFORM_BLOCK_FRAGMENTVIEW_BLOCK 
UNIFORM_BLOCK_ID_MAX 

◆ UserUniformBlockID

Enumerator
UNIFORM_BLOCK_USER_VERTEX_ID_0 
UNIFORM_BLOCK_USER_VERTEX_ID_1 
UNIFORM_BLOCK_USER_FRAGMENT_ID_0 
UNIFORM_BLOCK_USER_FRAGMENT_ID_1 

◆ UserSamplerSlot

Enumerator
USER_SAMPLER_SLOT_0 
USER_SAMPLER_SLOT_1 
USER_SAMPLER_SLOT_2 
USER_SAMPLER_SLOT_3 
USER_SAMPLER_SLOT_4 
USER_SAMPLER_SLOT_5 
USER_SAMPLER_SLOT_6 
USER_SAMPLER_SLOT_7 
USER_SAMPLER_SLOT_MAX 

◆ anonymous enum

anonymous enum
private
Enumerator
DISPLAY_LSIT_SIZE 

Constructor & Destructor Documentation

◆ ParticleShader()

nw::eft::ParticleShader::ParticleShader ( )

Member Function Documentation

◆ Finalize()

void nw::eft::ParticleShader::Finalize ( Heap * heap)

◆ SetupShaderResource()

bool nw::eft::ParticleShader::SetupShaderResource ( Heap * heap,
void * shaderResource,
u32 shaderResourceSize )

◆ SetVertexShaderKey()

void nw::eft::ParticleShader::SetVertexShaderKey ( VertexShaderKey * key)
inline

◆ SetFragmentShaderKey()

void nw::eft::ParticleShader::SetFragmentShaderKey ( FragmentShaderKey * key)
inline

◆ SetGeometryShaderKey()

void nw::eft::ParticleShader::SetGeometryShaderKey ( GeometryShaderKey * key)
inline

◆ GetVertexShaderKey()

const VertexShaderKey & nw::eft::ParticleShader::GetVertexShaderKey ( ) const
inline

◆ GetFragmentShaderKey()

const FragmentShaderKey & nw::eft::ParticleShader::GetFragmentShaderKey ( ) const
inline

◆ GetGeometryShaderKey()

const GeometryShaderKey & nw::eft::ParticleShader::GetGeometryShaderKey ( ) const
inline

◆ IsStripe()

bool nw::eft::ParticleShader::IsStripe ( ) const
inline

◆ GetShaderVariation()

FragmentShaderVariation nw::eft::ParticleShader::GetShaderVariation ( ) const
inline

◆ IsFragmentSoftEdgeVariation()

bool nw::eft::ParticleShader::IsFragmentSoftEdgeVariation ( ) const
inline

◆ GetTextureVariation()

FragmentTextureVariation nw::eft::ParticleShader::GetTextureVariation ( ) const
inline

◆ GetCombinerTyperVariation()

FragmentCombinerTypeVariation nw::eft::ParticleShader::GetCombinerTyperVariation ( ) const
inline

◆ GetAlphaVariation()

FragmentAlphaVariation nw::eft::ParticleShader::GetAlphaVariation ( ) const
inline

◆ InitializeAttribute()

void nw::eft::ParticleShader::InitializeAttribute ( )

◆ InitializeStripeAttribute()

void nw::eft::ParticleShader::InitializeStripeAttribute ( )

◆ InitializeVertexShaderLocation()

void nw::eft::ParticleShader::InitializeVertexShaderLocation ( )

◆ InitializeStripeVertexShaderLocation()

void nw::eft::ParticleShader::InitializeStripeVertexShaderLocation ( )

◆ InitializeFragmentShaderLocation()

void nw::eft::ParticleShader::InitializeFragmentShaderLocation ( )

◆ Setup()

void nw::eft::ParticleShader::Setup ( Heap * heap)
inline

◆ IsInitialized()

bool nw::eft::ParticleShader::IsInitialized ( ) const
inline

◆ Bind()

void nw::eft::ParticleShader::Bind ( )

◆ EnableInstanced()

void nw::eft::ParticleShader::EnableInstanced ( )

◆ DisableInstanced()

void nw::eft::ParticleShader::DisableInstanced ( )

◆ GetShaderInst()

Shader * nw::eft::ParticleShader::GetShaderInst ( )
inline

◆ BindViewUniformBlock()

void nw::eft::ParticleShader::BindViewUniformBlock ( ViewUniformBlock * block)
inline

◆ BindEmitterStaticUniformBlock()

void nw::eft::ParticleShader::BindEmitterStaticUniformBlock ( EmitterStaticUniformBlock * block)
inline

◆ BindEmitterDynamicUniformBlock()

void nw::eft::ParticleShader::BindEmitterDynamicUniformBlock ( EmitterDynamicUniformBlock * block)
inline

◆ GetPositionAttribute()

s32 nw::eft::ParticleShader::GetPositionAttribute ( ) const
inline

◆ GetNormalAttribute()

s32 nw::eft::ParticleShader::GetNormalAttribute ( ) const
inline

◆ GetColorAttribute()

s32 nw::eft::ParticleShader::GetColorAttribute ( ) const
inline

◆ GetTextureCoordAttribute()

s32 nw::eft::ParticleShader::GetTextureCoordAttribute ( ) const
inline

◆ GetTextureCoordAttribute1()

s32 nw::eft::ParticleShader::GetTextureCoordAttribute1 ( ) const
inline

◆ GetIndexAttribute()

s32 nw::eft::ParticleShader::GetIndexAttribute ( ) const
inline

◆ GetRotateAttribute()

s32 nw::eft::ParticleShader::GetRotateAttribute ( ) const
inline

◆ GetColorAttribute0()

s32 nw::eft::ParticleShader::GetColorAttribute0 ( ) const
inline

◆ GetColorAttribute1()

s32 nw::eft::ParticleShader::GetColorAttribute1 ( ) const
inline

◆ GetScaleAttribute()

s32 nw::eft::ParticleShader::GetScaleAttribute ( ) const
inline

◆ GetTexAnimAttribute()

s32 nw::eft::ParticleShader::GetTexAnimAttribute ( ) const
inline

◆ GetSubTexAnimAttribute()

s32 nw::eft::ParticleShader::GetSubTexAnimAttribute ( ) const
inline

◆ GetWolrdPosAttribute()

s32 nw::eft::ParticleShader::GetWolrdPosAttribute ( ) const
inline

◆ GetWolrdPosDiffAttribute()

s32 nw::eft::ParticleShader::GetWolrdPosDiffAttribute ( ) const
inline

◆ GetEmitterMatrix0Attribute()

s32 nw::eft::ParticleShader::GetEmitterMatrix0Attribute ( ) const
inline

◆ GetOuterAttribute()

s32 nw::eft::ParticleShader::GetOuterAttribute ( ) const
inline

◆ GetDirAttribute()

s32 nw::eft::ParticleShader::GetDirAttribute ( ) const
inline

◆ GetTextureSamplerLocation()

FragmentTextureLocation nw::eft::ParticleShader::GetTextureSamplerLocation ( TextureSlot slot) const
inline

◆ GetFrameBufferTextureSamplerLocation()

FragmentTextureLocation nw::eft::ParticleShader::GetFrameBufferTextureSamplerLocation ( ) const
inline

◆ GetDepthTextureSamplerLocation()

FragmentTextureLocation nw::eft::ParticleShader::GetDepthTextureSamplerLocation ( ) const
inline

◆ SetUserVertexUniformBlock()

bool nw::eft::ParticleShader::SetUserVertexUniformBlock ( UserUniformBlockID uniformBlockID,
const char * name,
void * param )

◆ SetUserFragmentUniformBlock()

bool nw::eft::ParticleShader::SetUserFragmentUniformBlock ( UserUniformBlockID uniformBlockID,
const char * name,
void * param )

◆ GetUserFragmentSamplerLocation()

FragmentTextureLocation nw::eft::ParticleShader::GetUserFragmentSamplerLocation ( UserSamplerSlot userSamplerSlot,
const char * name )

◆ GetUserVertexSamplerLocation()

VertexTextureLocation nw::eft::ParticleShader::GetUserVertexSamplerLocation ( UserSamplerSlot userSamplerSlot,
const char * name )

◆ Renderer

friend class Renderer
friend

Member Data Documentation

◆ mDisplayListBuffer

u8 nw::eft::ParticleShader::mDisplayListBuffer[DISPLAY_LSIT_SIZE]
private

◆ mDisplayListBufferUsed

u32 nw::eft::ParticleShader::mDisplayListBufferUsed
private

◆ mShader

Shader nw::eft::ParticleShader::mShader
private

◆ mVertexShaderKey

VertexShaderKey nw::eft::ParticleShader::mVertexShaderKey
private

◆ mFragmentShaderKey

FragmentShaderKey nw::eft::ParticleShader::mFragmentShaderKey
private

◆ mGeometryShaderKey

GeometryShaderKey nw::eft::ParticleShader::mGeometryShaderKey
private

◆ mPositionAttr

s32 nw::eft::ParticleShader::mPositionAttr
private

◆ mNormalAttr

s32 nw::eft::ParticleShader::mNormalAttr
private

◆ mColorAttr

s32 nw::eft::ParticleShader::mColorAttr
private

◆ mTexCoordAttr0

s32 nw::eft::ParticleShader::mTexCoordAttr0
private

◆ mTexCoordAttr1

s32 nw::eft::ParticleShader::mTexCoordAttr1
private

◆ mIndexAttr

s32 nw::eft::ParticleShader::mIndexAttr
private

◆ mOuterAttr

s32 nw::eft::ParticleShader::mOuterAttr
private

◆ mDirAttr

s32 nw::eft::ParticleShader::mDirAttr
private

◆ mFragmentTextureSampler

FragmentTextureLocation nw::eft::ParticleShader::mFragmentTextureSampler[EFT_TEXTURE_SLOT_MAX]
private

◆ mSclAttr

s32 nw::eft::ParticleShader::mSclAttr
private

◆ mTexAnimAttr

s32 nw::eft::ParticleShader::mTexAnimAttr
private

◆ mSubTexAnimAttr

s32 nw::eft::ParticleShader::mSubTexAnimAttr
private

◆ mWldPosAttr

s32 nw::eft::ParticleShader::mWldPosAttr
private

◆ mWldPosDfAttr

s32 nw::eft::ParticleShader::mWldPosDfAttr
private

◆ mColor0Attr

s32 nw::eft::ParticleShader::mColor0Attr
private

◆ mColor1Attr

s32 nw::eft::ParticleShader::mColor1Attr
private

◆ vRotAttr

s32 nw::eft::ParticleShader::vRotAttr
private

◆ mEmtMatAttr0

s32 nw::eft::ParticleShader::mEmtMatAttr0
private

◆ mEmtMatAttr1

s32 nw::eft::ParticleShader::mEmtMatAttr1
private

◆ mEmtMatAttr2

s32 nw::eft::ParticleShader::mEmtMatAttr2
private

◆ mVertexViewUniformBlock

UniformBlock nw::eft::ParticleShader::mVertexViewUniformBlock
private

◆ mFragmentViewUniformBlock

UniformBlock nw::eft::ParticleShader::mFragmentViewUniformBlock
private

◆ mVertexEmitterStaticUniformBlock

UniformBlock nw::eft::ParticleShader::mVertexEmitterStaticUniformBlock
private

◆ mVertexEmitterDynamicUniformBlock

UniformBlock nw::eft::ParticleShader::mVertexEmitterDynamicUniformBlock
private

◆ _56c

UniformBlock nw::eft::ParticleShader::_56c
private

◆ mFragmentEmitterStaticUniformBlock

UniformBlock nw::eft::ParticleShader::mFragmentEmitterStaticUniformBlock
private

◆ mStripeUniformBlock

UniformBlock nw::eft::ParticleShader::mStripeUniformBlock
private

◆ mUserVertexUniformBlock

UniformBlock nw::eft::ParticleShader::mUserVertexUniformBlock[2]
private

◆ mUserFragmentUniformBlock

UniformBlock nw::eft::ParticleShader::mUserFragmentUniformBlock[2]
private

◆ mUserVertexSamplerLocation

VertexTextureLocation nw::eft::ParticleShader::mUserVertexSamplerLocation[USER_SAMPLER_SLOT_MAX]
private

◆ mUserFragmentSamplerLocation

FragmentTextureLocation nw::eft::ParticleShader::mUserFragmentSamplerLocation[USER_SAMPLER_SLOT_MAX]
private