Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::ShaderDesc Struct Reference

Shader description. More...

#include <Shader.h>

Inheritance diagram for Diligent::ShaderDesc:
Diligent::DeviceObjectAttribs

Public Member Functions

bool operator== (const ShaderDesc &RHS) const noexcept
 Tests if two shader descriptions are equal.
 

Public Attributes

SHADER_TYPE ShaderType = SHADER_TYPE_UNKNOWN
 Shader type. See Diligent::SHADER_TYPE.
 
Bool UseCombinedTextureSamplers = false
 Whether to use combined texture samplers.
 
const Char * CombinedSamplerSuffix = "_sampler"
 Combined sampler suffix.
 
- Public Attributes inherited from Diligent::DeviceObjectAttribs
const Char * Name = nullptr
 Object name.
 

Detailed Description

Shader description.

Member Function Documentation

◆ operator==()

bool Diligent::ShaderDesc::operator== ( const ShaderDesc & RHS) const
inlinenoexcept

Tests if two shader descriptions are equal.

Parameters
[in]RHS- reference to the structure to compare with.
Returns
true if all members of the two structures except for the Name are equal, and false otherwise.
Note
The operator ignores the Name field as it is used for debug purposes and doesn't affect the shader properties.

Member Data Documentation

◆ CombinedSamplerSuffix

const Char* Diligent::ShaderDesc::CombinedSamplerSuffix = "_sampler"

Combined sampler suffix.

If UseCombinedTextureSamplers is true, defines the suffix added to the texture variable name to get corresponding sampler name. For example, for default value "_sampler", a texture named "tex" will be combined with the sampler named "tex_sampler". If UseCombinedTextureSamplers is false, this member is ignored.

This member has no effect if the shader is used in the PSO that uses pipeline resource signature(s).

◆ UseCombinedTextureSamplers

Bool Diligent::ShaderDesc::UseCombinedTextureSamplers = false

Whether to use combined texture samplers.

If set to true, textures will be combined with texture samplers. The CombinedSamplerSuffix member defines the suffix added to the texture variable name to get corresponding sampler name. When using combined samplers, the sampler assigned to the shader resource view is automatically set when the view is bound. Otherwise, samplers need to be explicitly set similar to other shader variables.

This member has no effect if the shader is used in the PSO that uses pipeline resource signature(s).