It is currently Wed Oct 18, 2017 8:50 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Fri Jun 30, 2017 1:32 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 248
Having the lower 3 bits set from the upper 3 bits, adds a slight Gamma "curve". in that the 111XX values will have the lower 3 bits be 111 which is the brighter side, and then 000XX will have the lower 3 bits 000 which is the darker side.

Also ZSNES is 486 not fancy pants Pentium.


Top
 Profile  
 
PostPosted: Fri Jun 30, 2017 2:25 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7230
Location: Chexbres, VD, Switzerland
Oziphantom wrote:
Having the lower 3 bits set from the upper 3 bits, adds a slight Gamma "curve".

No, the increase is linear, and it's just a different rounding algorithm. There's no such thing as a "curve" here, just straight lines.

Also, I think the "proper" algorithm would be multiply by 255/31 and round to the nearest number, which is even closer to multiply by 33/4 and roudning to the lowest number. The only 4 values where those both algorithms leads to different results are shown.

Code:
0       0       0
1       8       8
2       16      16
3       25      24   <-----
4       33      33
5       41      41
6       49      49
7       58      57    <-----
8       66      66
9       74      74
10      82      82
11      90      90
12      99      99
13      107     107
14      115     115
15      123     123
16      132     132
17      140     140
18      148     148
19      156     156
20      165     165
21      173     173
22      181     181
23      189     189
24      197     198    <-----
25      206     206
26      214     214
27      222     222
28      230     231     <------
29      239     239
30      247     247
31      255     255


For each of those cases, the value is close to the rounding boundary of n.5 :
3 -> 24.68 rounds to 25 but is also close to 24
7 -> 57.58 rounds to 58 but is also close to 57
24 -> 197.42 rounds to 197 but is also close to 198
28 -> 230.32 rounds to 230 but is not that far from 231

So I think copying the top bits to the unused bottom bits is actually a perfectly valid way to do it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: infiniteneslives, tepples and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group