Skip to content
Snippets Groups Projects
Commit ca63a5ed authored by Nicolai Hähnle's avatar Nicolai Hähnle
Browse files

glsl: fix interpolateAtXxx(some_vec[idx], ...) with dynamic idx


The dynamic index of a vector (not array!) is lowered to a sequence of
conditional assignments. However, the interpolate_at_* expressions
require that the interpolant is an l-value of a shader input.

So instead of doing conditional assignments of parts of the shader input
and then interpolating that (which is nonsensical), we interpolate the
entire shader input and then do conditional assignments of the interpolated
result.

Reviewed-by: default avatarTimothy Arceri <tarceri@itsqueeze.com>
parent 4f42450b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment