hlsl2glslfork
hlsl2glslfork copied to clipboard
Samplers as function parameters
HLSL2GLSL cannot figure out what sampler type to cast to if the parameter and argument sampler type differ:
// You can't pass a generic sampler type ("sampler") to this float4 my_function(sampler2D s, float2 uv) { return tex2D(s, uv); }
// You can ONLY pass a generic sampler type ("sampler") to this float4 my_function(sampler s, float2 uv) { return tex2D(s, uv); }