Question for the GPU coders out there: I have an R16 texture containing palette indices. What's the easiest way, in a pixel shader, to go from a texel in that R16 texture, to a U/V pair to look up the palette entry in a 256x256 palette texture?
-
-
With ints it seems arbitrary! :)
Kiitos. Käytämme tätä aikajanasi parantamiseen. KumoaKumoa
-
-
-
Bind the texture as an R8G8 and point-sample. Then use those values as UV coords for the palette lookup (also point sampled). You'll need a bunch of magic offsets to make the point sampling robust - try 0.375
-
Worked perfectly, thanks!
Keskustelun loppu
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.