Skip to content

vkd3d-shader/spirv: Allow gradient sampling cube textures.

Giovanni Mascellani requested to merge giomasce/vkd3d:etna into master

Currently emitting gradient sampling assumes that the number of components of the gradient is the same as the number of components of offsets. This is not correct, because offsets are not allowed for cube textures, while gradient sampling is allowed for cube textures.

This commit splits the concepts of offset component count and gradient component count. The gradient component count is indeed equal to the offset component count for all the texture dimensions where the latter makes sense, but is also defined for cube textures.

This commit fixes the compilation of shaders in Star Wars Jedi: Survivor, which make use of gradient sampling a cube texture.

Merge request reports

Loading