Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samplers as function parameters #22

Open
aras-p opened this issue Mar 8, 2013 · 0 comments
Open

Samplers as function parameters #22

aras-p opened this issue Mar 8, 2013 · 0 comments
Labels

Comments

@aras-p
Copy link
Owner

aras-p commented Mar 8, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant