SPV texturing: Use comp. 2 as the 3rd comp. for Dref in ImageSampleProjDrefImplicitLod.

This commit is contained in:
John Kessenich
2015-12-13 12:23:33 -07:00
parent f5ce646546
commit 6feb4989fe
5 changed files with 9 additions and 9 deletions

View File

@@ -1951,7 +1951,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
std::vector<spv::Id> indexes;
int comp;
if (cracked.proj)
comp = 3;
comp = 2; // "The resulting 3rd component of P in the shadow forms is used as Dref"
else
comp = builder.getNumComponents(params.coords) - 1;
indexes.push_back(comp);