Timeline for Directx 11: emulating palette swapping with shader 5.0 and c++
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 27, 2013 at 9:12 | answer | added | BRICK | timeline score: 1 | |
Dec 25, 2013 at 16:50 | comment | added | user13213 |
You could also try to use txPalette.Load(int3(Index.r, 0, 0)) (which uses integer coordinates) to avoid any sampling, filtering or mipmapping. (You might also want to change the type of your index texture to int or uint as well)
|
|
Dec 25, 2013 at 15:02 | comment | added | BRICK | @Andon - Thank, you for the reply. I have edited the question and added an image with your suggestion, but the result is almost identically. | |
Dec 25, 2013 at 15:02 | history | edited | BRICK | CC BY-SA 3.0 |
added 177 characters in body
|
Dec 24, 2013 at 21:56 | history | tweeted | twitter.com/#!/StackGameDev/status/415601797102051328 | ||
Dec 24, 2013 at 21:51 | comment | added | Andon M. Coleman |
You really should not be using those coordinates to sample with, especially when you use BORDER for your address mode. Your first and last palette entries are going to be replaced with a constant color. Consider float2( ( Index.r * 255.0 + 0.5 ) / w, 0.5 ) instead. Now each of your U/V coordinates will sample your palette texture exactly at the center of a texel instead of at the border.
|
|
Dec 24, 2013 at 16:35 | review | First posts | |||
Dec 24, 2013 at 18:41 | |||||
Dec 24, 2013 at 16:17 | history | asked | BRICK | CC BY-SA 3.0 |