Rebel Fork Framework
Urho3D::ShaderVariation Class Reference

Vertex or pixel shader on the GPU. More...

#include <Urho3D/Graphics/ShaderVariation.h>

Inheritance diagram for Urho3D::ShaderVariation:

Public Member Functions

 ShaderVariation (Shader *owner, ShaderType type, const ea::string &defines)
 
ea::string GetShaderName () const
 Return shader name (as used in resources).
 
ea::string GetShaderVariationName () const
 Return full shader variation name with defines.
 
const ea::string & GetDefines () const
 Return defines used to create the shader.
 

Private Member Functions

ea::string GetCachedVariationName (ea::string_view extension) const
 
bool NeedShaderTranslation () const
 
bool NeedShaderOptimization () const
 
ea::string PrepareGLSLShaderCode (const ea::string &originalShaderCode) const
 
bool ProcessShaderSource (ea::string_view &translatedSource, const SpirVShader *&translatedSpirv, ConstByteSpan &translatedBytecode, ea::string_view originalShaderCode)
 
void OnReloaded ()
 
bool Create ()
 
bool CompileFromSource ()
 
bool LoadByteCode (const FileIdentifier &binaryShaderName)
 
void SaveByteCode (const FileIdentifier &binaryShaderName)
 

Private Attributes

WeakPtr< Graphicsgraphics_
 Cached pointer to Graphics subsystem.
 
WeakPtr< Shaderowner_
 Source shader.
 
ea::string defines_
 Defines to use when compiling the shader.
 

Detailed Description

Vertex or pixel shader on the GPU.


The documentation for this class was generated from the following files: