scanlines intensity in newgfx16.asm

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
theelf
Rookie
Posts: 21
Joined: Mon Oct 01, 2012 11:24 am
Contact:

scanlines intensity in newgfx16.asm

Post by theelf »

Hi!

i was checking the scanlines code, beause I want to change 50% to 70% scanlines, and finally realize the intensity is in the file newgfx16.asm

For example, in

NEWSYM HalfTrans, dd 11110111110111101111011111011110b,11110111110111101111011111011110b,0,0

I can change intensity of scanlines


Someone can explain to me, please, what really every number does? is about RGB colors, but still did not figure yet what exactly im touching

Thanks, sorry my english
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Re: scanlines intensity in newgfx16.asm

Post by kode54 »

The color values are bit shifted to the right by one bit (50%) and the least significant bits are masked off so they don't overflow into the neighboring color channels.

To do any arbitrary color level, you'll need to use actual multiplication and/or division instead of bit shifting.
theelf
Rookie
Posts: 21
Joined: Mon Oct 01, 2012 11:24 am
Contact:

Re: scanlines intensity in newgfx16.asm

Post by theelf »

kode54 wrote:The color values are bit shifted to the right by one bit (50%) and the least significant bits are masked off so they don't overflow into the neighboring color channels.

To do any arbitrary color level, you'll need to use actual multiplication and/or division instead of bit shifting.

Oh! thanks a lot for your answer and time, I already change the scanlines code to addapt my taste (and my CRT) :D

Looks great!!
Post Reply