Strange Color Swizzle needed

Hi all,

i am writing a shader that does a sort-of-lightwriting.
It writes to two render targets, one being the output,
the other being a difference image for future lookups.
The shader runs fine under windows, but under osx
( nv hardware, all on the same machine ) i have to do a
strange color swizzle.

A simple texture lookup, that generally looks like this

vec4 col_now = texture2D(live_texture, texCoord);

has to be swizzled now:

vec4 col_now = texture2D(live_texture, texCoord).grab;

I am somewhat disturbed by the swizzle pattern,
i would understand ‘rgba’, ‘argb’ ‘bgra’ … all known
and common, but ‘grab’ ??
does anyone know what happened to my data to require this?
I cant even imagine a texture format that does this
swizzling. The shader uses gl_FragData, is this somehow


Big- versus little-endian ? (Shooting in the dark here).

What texture format are you using? If you switch that format to a common format like RGBA8, does the issue go away? ‘grab’ almost looks like the texels are in bgra format, but offset by a single component (which sounds like a bug).

Which version of OSX are you running?

… indeed …

i am using 10.6.6 on a MacBookPro 6,2 NVIDIA GeForce GT 330M

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.