SPV: For AST interpolateAt* ops consuming a swizzle, invert the order.
Apply the interpolation first, then apply the swizzle to the result, the inverse of the order requested by the AST. This fixes issue #411.
This commit is contained in:
parent
731cd83ef6
commit
8c8505c604
5 changed files with 184 additions and 29 deletions
16
Test/spv.swizzleInversion.frag
Normal file
16
Test/spv.swizzleInversion.frag
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#version 450
|
||||
|
||||
in vec4 in4;
|
||||
in vec3 in3;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 v43 = interpolateAtCentroid(in4.wzx);
|
||||
vec2 v42 = interpolateAtSample(in4.zx, 1);
|
||||
vec4 v44 = interpolateAtOffset(in4.zyxw, vec2(2.0));
|
||||
float v41 = interpolateAtOffset(in4.y, vec2(2.0));
|
||||
|
||||
vec3 v33 = interpolateAtCentroid(in3.yzx);
|
||||
vec2 v32 = interpolateAtSample(in3.zx, 1);
|
||||
float v31 = interpolateAtOffset(in4.y, vec2(2.0));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue