Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Float textures in shaders



Yes, changing to FLOAT16 gets rid of the artifacts, but I think you're right -- it 
may not actually be a float texture anyway.  As a quick sanity check I multiply 
the texture values by 10, then multiply by 0.1 in the shader, and I get dim 
values (instead of the original values).  Either that or the driver's clamping the 
values (which it shouldn't do for a float texture).

Another thing I noticed was that while using GL_RGB_FLOAT32_APPLE no 
filtering was performed (other than NEAREST) - I know this is the way the 
NVIDIA float texture extension works, but there's nothing mentioned about it in 
the Apple spec.


Keenan

---- Original message ----
>Date: Tue, 23 Nov 2004 16:21:23 -0500
>From: Gordon Erlebacher <email@hidden>  
>Subject: Re: Float textures in shaders  
>To: email@hidden
>Cc: email@hidden
>
>I duplicated your problem on my G4 powerbook, Radeon 9600. When I change 
>to GL_RGB_FLOAT16_APPLE,
>your program works properly. When I change to GL_RGB, it works as well.
>Therefore, there might be a bug with GL_RGB_FLOAT32_APPLE.
>
>What proof do you have that you are actually using a float texture. The 
>fact that the results (with a single texture) are
>the same whether in 32, 16, or 8 bit tells me that the format could be 
>anything. You probably have to experiment
>with glReadPixels() to determine what is actually in your textures.
>
>  Gordon
>
>
>email@hidden wrote:
>
>>Here's how I'm using it:
>>
>>glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB_FLOAT32_APPLE, width, height, 
0, 
>>GL_RGB, GL_FLOAT, float_texels );
>>
>>And here's a small GLUT program that successfully uses a float texture in a 
>>shader (though shows the artifacts when used at the same time as a non-
float 
>>texture):
>>
>>http://www.acm.uiuc.edu/~kcrane/fptex_artifacts.tar.gz
>>
>>
>>Keenan
>>
>>---- Original message ----
>>  
>>
>>>Date: Tue, 23 Nov 2004 14:36:17 -0500
>>>From: Gordon Erlebacher <email@hidden>  
>>>Subject: Re: Float textures in shaders  
>>>To: email@hidden
>>>Cc: email@hidden
>>>
>>>I have had my share of problems with GL_RGB_FLOAT32_APPLE. Could you 
>>>    
>>>
>>please
>>  
>>
>>>send the full line with glTexImage2D?  I have never been convinced that 
>>>the floating textures
>>>work properly. Thanks.
>>>
>>> Gordon
>>>
>>>
>>>email@hidden wrote:
>>>
>>>    
>>>
>>>>I'm getting artifacts like this:
>>>>
>>>>http://www.acm.uiuc.edu/~kcrane/floattex_artifacts.jpg
>>>>
>>>>when I try to multiply a floating-point texture (using 
>>>>      
>>>>
>>GL_RGB_FLOAT32_APPLE) 
>>  
>>
>>>>with an 8 bit/component RGB texture in a fragment shader.  The strange 
>>>>      
>>>>
>>thing 
>>  
>>
>>>>is I only get these artifacts when the output color is dependent on both 
>>>>      
>>>>
>>textures 
>>  
>>
>>>>-- passing through one texture or the other gives the correct results.  I'm 
>>>>      
>>>>
>>using 
>>  
>>
>>>>a mobility 9700, 10.3.6, and Cg version 1.2.1001 w/ arbfp1
>>>>
>>>>Keenan
>>>>_______________________________________________
>>>>Do not post admin requests to the list. They will be ignored.
>>>>Mac-opengl mailing list      (email@hidden)
>>>>Help/Unsubscribe/Update your Subscription:
>>>>http://lists.apple.com/mailman/options/mac-opengl/
>>>>      
>>>>
>>email@hidden
>>  
>>
>>>>This email sent to email@hidden
>>>> 
>>>>
>>>>      
>>>>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.