Sign in to follow this  

OpenGL image1D as function parameter in glsl

Recommended Posts

Hi like the topic suggests I am trying to find a way to pass an image1D (2D or whatever) in a parameterlist of a glsl function like:

vec4 myImageLoad (in image1D tex, int pos) {...}

This is simply for convenience when i need to do some more calcularion on the texel value.


However i did not get my driver (AMD HD6950) to compile this, the error would be "missing or invalid layout qualifier"

when I use a layout qualifier like this:

vec4 myImageLoad (layout (rgba32f) in image1D paramtex, int light) {...}

The compiler suggests: "parse error on 'layout'".


Since the glwiki told me this would be possible, but didnt give a syntax example (, one of you guys might give me a hint.


Edited by Wh0p

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this