MCPcopy Create free account
hub / github.com/carbonengine/trinity / ParseRtShaderName

Function ParseRtShaderName

shadercompiler/FXAnalyzer.cpp:1791–1817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1789
1790
1791std::optional<RtShaderType> ParseRtShaderName( const InlineString& name )
1792{
1793 if( EqualsCaseInsensitive( name, "raygenshader" ) )
1794 {
1795 return RtShaderType::RAY_GEN;
1796 }
1797 else if( EqualsCaseInsensitive( name, "missshader" ) )
1798 {
1799 return RtShaderType::MISS;
1800 }
1801 else if( EqualsCaseInsensitive( name, "closesthitshader" ) )
1802 {
1803 return RtShaderType::CLOSEST_HIT;
1804 }
1805 else if( EqualsCaseInsensitive( name, "anyhitshader" ) )
1806 {
1807 return RtShaderType::ANY_HIT;
1808 }
1809 else if( EqualsCaseInsensitive( name, "intersectionshader" ) )
1810 {
1811 return RtShaderType::INTERSECTION;
1812 }
1813 else
1814 {
1815 return {};
1816 }
1817}

Callers 2

CompileEffectMethod · 0.85
CompileEffectMethod · 0.85

Calls 1

EqualsCaseInsensitiveFunction · 0.85

Tested by

no test coverage detected