# DrawTexture using LoadNormalizedGammaTable on OS X

**URL:** <https://psychtoolbox.discourse.group/t/drawtexture-using-loadnormalizedgammatable-on-os-x/1015>\
**Category:** Uncategorized\
**Created:** [June 12, 2006, 7:13pm UTC](https://psychtoolbox.discourse.group/t/drawtexture-using-loadnormalizedgammatable-on-os-x/1015 "2006-06-12T19:13:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 12, 2006, 7:13pm UTC](https://psychtoolbox.discourse.group/t/drawtexture-using-loadnormalizedgammatable-on-os-x/1015/1 "2006-06-12T19:13:21Z")

</div>

Hi all,  
  
I have been playing around with DrawTexture lately, and I noticed  
something I don't understand. I am using GetImage to get my initial  
texture, and the size of the sourceRect/destinationRect. If I am not  
using LoadNormalizedGammaTable to set a CLUT, then everything works as  
expected. If I set a CLUT, however, there are some artifacts in my  
texture (tiny blobs of red, green, and possibly blue, but the  
background is black, so hard to say). These go away if I change the  
filterMode to 0 = Nearest neighbour filtering. There should not be a  
problem with the different sizes of Rect, they are exactly the same  
size, and since I am using GetImage, I think I should not have  
fractional pixel values. So, changing the filterMode fixes the  
problem, but I am wondering why there was a problem in the first  
place, and why it was only apparent when I started using a CLUT? Does  
anyone have any idea what could be going on here?  
  
thanks,  
Maria  
  
  
--   
Maria Mckinley  
Scientific Programmer  
Shadlen Lab  
Physiology and Biophysics  
University of Washington  
(206) 616-7107  
[parody@...](mailto:parody@...)
