hlsl2glslfork icon indicating copy to clipboard operation
hlsl2glslfork copied to clipboard

Samplers as function parameters

Open aras-p opened this issue 11 years ago • 0 comments

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); }

aras-p avatar Mar 08 '13 08:03 aras-p