comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Question about using palettes with images and shader in object graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Question about using palettes with images and shader in object graphics [message #83272] Tue, 12 February 2013 12:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
M. Katz writes:

>
> Here I'll answer my own question definitively from the IDL Help on IDLgrImage (See the last line):
>
> PALETTE
> An object reference to a palette object (an instance of the IDLgrPalette object class) that specifies the red, green, and blue values of the color lookup table to be associated with the image if it is an indexed color image. This property is ignored if the image is a greyscale or RGB image.
>
> Note: This table is only used when the destination is an RGB model device. The Indexed color model writes the indices directly to the device. In order to ensure that these colors are used when the image is displayed, this palette must be copied to the graphics destination’s palette for any graphics destination that uses the Indexed color model.
>
> Note: If a SHADER is associated with the image object, the palette is ignored.

This seems to conflict with this statement, in the same documentation:

Note: If a PALETTE has been set, the palette lookup is done before the
fragment shader is executed. Therefore, when the fragment shader reads
from the image texture it will be passed 8-bit per channel RGB data
(read from the palette), not the original 1-channel image data.

Go figure. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL sites
Next Topic: IDL sites on WWW

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:09:44 PDT 2025

Total time taken to generate the page: 0.00754 seconds