HLSL: Additional channel value for textureGatherXXX().
When mapping HLSL gather intrinsics to GLSL textureGatherXXX() built-in function, the channel selection value is only valid for non-shadow samplers.
This commit is contained in:
@@ -3082,7 +3082,9 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
|
||||
if (argOffset != nullptr)
|
||||
txgather->getSequence().push_back(argOffset);
|
||||
|
||||
txgather->getSequence().push_back(argChannel);
|
||||
// Add channel value if the sampler is not shadow
|
||||
if (! argSamp->getType().getSampler().isShadow())
|
||||
txgather->getSequence().push_back(argChannel);
|
||||
|
||||
txgather->setType(node->getType());
|
||||
txgather->setLoc(loc);
|
||||
|
||||
Reference in New Issue
Block a user