View Full Version : Decode z-value in pixel-shader
09-29-2003, 06:47 AM
someone know the way for encode and decode z-depth value
(for shadow-map)stored in color register or texture
register in pixel shader,under 1_1 and 1_4?.
Thanks in Advance
This looks like DirectX slang, however, I am quite sure they are looked up as luminance textures.
09-29-2003, 10:22 AM
Just curious, but could this really even work? PS1.1's range is limited to [-1,1] and PS1.4's is limited to [-8,8]. . . Wouldn't such a conversion require a floating point precision?
09-29-2003, 10:56 AM
Depends on the hardware. The API doesn't limit the range on the various shader versions.
R2XX = 12bit Fixed (PS 1.0 - 1.4)
R3XX = 24bit Float (PS 1.0 - 2.0)
NV2X = 8bit Fixed (PS 1.0 - 1.3), 16bit fixed for hilo textures
NV3X = ??bit ?? (PS 1.0 - 2.0, god knows what kind of driver hack/slash they do, hard to tell WHAT bit precision it's running at)
[This message has been edited by NitroGL (edited 09-29-2003).]
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.