I was wondering if it’s possible to this in GLSL since I don’t think it’s possible with HLSL. Is it possible to get an interpolated 3D coordinates in the pixel shader, as a variant, like we do with texture coordinates? Though I don’t find any reason why it’s not possible.
If it supports GLSL it must support at least some varying variables. The specifications say the minimum is 32 floats (say eight vec4’s), however really old cards such as the Geforce 2 GTS only supports 8 floats (two vec4’s). However anything newer than that seems to support the minimum of 32.
Of course, this is the most basic shader functionality. It’s no different from passing texture coordinates from the vertex shader to the fragment shader.