int attribute interpolation from vertex shader to pixel shader.

Started by
1 comment, last by Volgogradetzzz 9 years, 3 months ago

Greetings,

I have some vertex buffer that stores some int as vertex attribute. And passing this value to pixel shader doesn't interpolates it. I'm expecting it behave with usual float-to-int conversion. Changing from int to float do the trick - everything works as expected. Is there some rule for this or I just forgot something?

Advertisement

Only float values can be interpolated. I think you should've gotten an error or warning during shader compilation?

From https://msdn.microsoft.com/en-us/library/windows/desktop/bb509668%28v=vs.85%29.aspx :

1. When using an int/uint type, the only valid option is nointerpolation.

Oh, thank you. No, there's no errors/warnings even if I specify interpolation (linear) explicitly.

This topic is closed to new replies.

Advertisement