Rebel Fork Framework
|
Material rendering pass, which defines shaders and render state. More...
#include <Urho3D/Graphics/Technique.h>
Public Member Functions | |
Pass (const ea::string &name) | |
Construct. | |
~Pass () override | |
Destruct. | |
void | SetBlendMode (BlendMode mode) |
void | SetCullMode (CullMode mode) |
void | SetDepthTestMode (CompareMode mode) |
void | SetDepthWrite (bool enable) |
void | SetColorWrite (bool enable) |
void | SetAlphaToCoverage (bool enable) |
void | SetVertexShader (const ea::string &name) |
void | SetPixelShader (const ea::string &name) |
void | SetVertexShaderDefines (const ea::string &defines) |
void | SetPixelShaderDefines (const ea::string &defines) |
void | SetVertexShaderDefineExcludes (const ea::string &excludes) |
void | SetPixelShaderDefineExcludes (const ea::string &excludes) |
void | SetVertexTextureDefines (const StringVector &textures) |
void | SetPixelTextureDefines (const StringVector &textures) |
void | ReleaseShaders () |
Reset shader pointers. | |
void | MarkShadersLoaded (unsigned frameNumber) |
Mark shaders loaded this frame. | |
const ea::string & | GetName () const |
Return pass name. | |
unsigned | GetIndex () const |
Return pass index. This is used for optimal render-time pass queries that avoid map lookups. | |
BlendMode | GetBlendMode () const |
CullMode | GetCullMode () const |
CompareMode | GetDepthTestMode () const |
unsigned | GetShadersLoadedFrameNumber () const |
Return last shaders loaded frame number. | |
bool | GetColorWrite () const |
bool | GetDepthWrite () const |
bool | GetAlphaToCoverage () const |
bool | IsAlphaMask () const |
Return whether the pass uses cutout transparency via ALPHAMASK. | |
const ea::string & | GetVertexShader () const |
const ea::string & | GetPixelShader () const |
const ea::string & | GetVertexShaderDefines () const |
const ea::string & | GetPixelShaderDefines () const |
const ea::string & | GetVertexShaderDefineExcludes () const |
const ea::string & | GetPixelShaderDefineExcludes () const |
ea::vector< SharedPtr< ShaderVariation > > & | GetVertexShaders () |
Return vertex shaders. | |
ea::vector< SharedPtr< ShaderVariation > > & | GetPixelShaders () |
Return pixel shaders. | |
const StringVector & | GetVertexTextureDefines () const |
Return names of textures to be reported as defines in vertex shader code. | |
const StringVector & | GetPixelTextureDefines () const |
Return names of textures to be reported as defines in pixel shader code. | |
ea::vector< SharedPtr< ShaderVariation > > & | GetVertexShaders (const StringHash &extraDefinesHash) |
Return vertex shaders with extra defines from the renderpath. | |
ea::vector< SharedPtr< ShaderVariation > > & | GetPixelShaders (const StringHash &extraDefinesHash) |
Return pixel shaders with extra defines from the renderpath. | |
ea::string | GetEffectiveVertexShaderDefines () const |
Return the effective vertex shader defines, accounting for excludes. Called internally by Renderer. | |
ea::string | GetEffectivePixelShaderDefines () const |
Return the effective pixel shader defines, accounting for excludes. Called internally by Renderer. | |
Public Member Functions inherited from Urho3D::RefCounted | |
RefCounted () | |
Construct. Allocate the reference count structure and set an initial self weak reference. | |
virtual | ~RefCounted () |
Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist. | |
RefCounted (const RefCounted &rhs)=delete | |
Prevent copy construction. | |
RefCounted & | operator= (const RefCounted &rhs)=delete |
Prevent assignment. | |
int | AddRef () |
int | ReleaseRef () |
int | Refs () const |
int | WeakRefs () const |
RefCount * | RefCountPtr () const |
Return pointer to the reference count structure. | |
bool | HasScriptObject () const |
Return true if script runtime object wrapping this native object exists. | |
bool | IsScriptStrongRef () const |
Return true if script reference is strong. | |
Public Member Functions inherited from Urho3D::PipelineStateTracker | |
virtual | ~PipelineStateTracker () |
Destruct. | |
unsigned | GetPipelineStateHash () const |
Return (partial) pipeline state hash. Save to call from multiple threads as long as the object is not changing. | |
void | MarkPipelineStateHashDirty () |
Mark pipeline state hash as dirty. | |
Private Member Functions | |
unsigned | RecalculatePipelineStateHash () const override |
Recalculate hash of pipeline state configuration. | |
Private Attributes | |
unsigned | index_ |
Pass index. | |
BlendMode | blendMode_ |
Blend mode. | |
CullMode | cullMode_ |
Culling mode. | |
CompareMode | depthTestMode_ |
Depth compare mode. | |
unsigned | shadersLoadedFrameNumber_ |
Last shaders loaded frame number. | |
bool | colorWrite_ |
Color write mode. | |
bool | depthWrite_ |
Depth write mode. | |
bool | alphaToCoverage_ |
Alpha-to-coverage mode. | |
bool | isAlphaMask_ {} |
Whether the pass uses cutout transparency via ALPHAMASK. | |
ea::string | vertexShaderName_ |
Vertex shader name. | |
ea::string | pixelShaderName_ |
Pixel shader name. | |
ea::string | vertexShaderDefines_ |
Vertex shader defines. | |
ea::string | pixelShaderDefines_ |
Pixel shader defines. | |
ea::string | vertexShaderDefineExcludes_ |
Vertex shader define excludes. | |
ea::string | pixelShaderDefineExcludes_ |
Pixel shader define excludes. | |
ea::vector< SharedPtr< ShaderVariation > > | vertexShaders_ |
Vertex shaders. | |
ea::vector< SharedPtr< ShaderVariation > > | pixelShaders_ |
Pixel shaders. | |
ea::unordered_map< StringHash, ea::vector< SharedPtr< ShaderVariation > > > | extraVertexShaders_ |
Vertex shaders with extra defines from the renderpath. | |
ea::unordered_map< StringHash, ea::vector< SharedPtr< ShaderVariation > > > | extraPixelShaders_ |
Pixel shaders with extra defines from the renderpath. | |
StringVector | vertexTextureDefines_ |
StringVector | pixelTextureDefines_ |
ea::string | name_ |
Pass name. | |
Additional Inherited Members | |
Protected Member Functions inherited from Urho3D::PipelineStateTracker | |
PipelineStateSubscription | CreateDependency (PipelineStateTracker *dependency) |
Create dependency onto another pipeline state. | |
void | AddSubscriberReference (PipelineStateTracker *subscriber) |
Add reference to subscriber pipeline state tracker. | |
void | RemoveSubscriberReference (PipelineStateTracker *subscriber) |
Remove reference to subscriber pipeline state tracker. | |
Material rendering pass, which defines shaders and render state.
|
inline |
Return alpha-to-coverage mode.
|
inline |
Return blend mode.
|
inline |
Return color write mode.
|
inline |
Return culling mode override. If pass is not overriding culling mode (default), the illegal mode MAX_CULLMODES is returned.
|
inline |
Return depth compare mode.
|
inline |
Return depth write mode.
|
inline |
Return pixel shader name.
|
inline |
Return pixel shader define excludes.
|
inline |
Return pixel shader defines.
|
inline |
Return vertex shader name.
|
inline |
Return vertex shader define excludes.
|
inline |
Return vertex shader defines.
void Urho3D::Pass::SetAlphaToCoverage | ( | bool | enable | ) |
Set alpha-to-coverage on/off.
void Urho3D::Pass::SetBlendMode | ( | BlendMode | mode | ) |
Set blend mode.
void Urho3D::Pass::SetColorWrite | ( | bool | enable | ) |
Set color write on/off.
void Urho3D::Pass::SetCullMode | ( | CullMode | mode | ) |
Set culling mode override. By default culling mode is read from the material instead. Set the illegal culling mode MAX_CULLMODES to disable override again.
void Urho3D::Pass::SetDepthTestMode | ( | CompareMode | mode | ) |
Set depth compare mode.
void Urho3D::Pass::SetDepthWrite | ( | bool | enable | ) |
Set depth write on/off.
void Urho3D::Pass::SetPixelShader | ( | const ea::string & | name | ) |
Set pixel shader name.
void Urho3D::Pass::SetPixelShaderDefineExcludes | ( | const ea::string & | excludes | ) |
Set pixel shader define excludes. Use to mark defines that the shader code will not recognize, to prevent compiling redundant shader variations.
void Urho3D::Pass::SetPixelShaderDefines | ( | const ea::string & | defines | ) |
Set pixel shader defines. Separate multiple defines with spaces.
void Urho3D::Pass::SetVertexShader | ( | const ea::string & | name | ) |
Set vertex shader name.
void Urho3D::Pass::SetVertexShaderDefineExcludes | ( | const ea::string & | excludes | ) |
Set vertex shader define excludes. Use to mark defines that the shader code will not recognize, to prevent compiling redundant shader variations.
void Urho3D::Pass::SetVertexShaderDefines | ( | const ea::string & | defines | ) |
Set vertex shader defines. Separate multiple defines with spaces.