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

Function GetSamplerArg

shadercompiler/TextureFunctionConversionDX11.cpp:58–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58static ASTNode* GetSamplerArg( ASTNode* arg )
59{
60 if( arg == nullptr )
61 {
62 return nullptr;
63 }
64 switch( arg->GetNodeType() )
65 {
66 case NT_VAR_IDENTIFIER:
67 return arg;
68 case NT_EXPRESSION:
69 if( arg->GetToken()->type == OP_LEFT_PAREN )
70 {
71 return GetSamplerArg( arg->GetChildOrNull( 0 ) );
72 }
73 default:
74 break;
75 }
76 return nullptr;
77}
78
79static const char* GetTextureTypeName( int textureType )
80{

Callers 2

FindTextureToSamplerFunction · 0.85
PatchCallsFunction · 0.85

Calls 3

GetNodeTypeMethod · 0.80
GetTokenMethod · 0.80
GetChildOrNullMethod · 0.80

Tested by

no test coverage detected