It is currently Mon Oct 23, 2017 7:17 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Jul 12, 2014 7:32 am 
Offline

Joined: Tue Apr 24, 2012 12:22 pm
Posts: 53
Hi,
I'm trying to do a transparency / light effect on SNES for my snes game. The goal is to do like in indiana game when the hero is not near the lights (it is darker when he is not near the light). I can see transparency is different when he is near the light (2132 register is increment as I can see with no$sns).
I use BG2 as topmost BG for mode 1, BG1/BG0 and SPRITES.
I did same bg as in indy for my gb2 background (circles with different greyscale).
The gloabl effect works and I can have a BG modified with some dark effect to the sides but ....
I want to change color with 2132 register but it has no effect, does someone has a correct example to do trnasparency / light effect as in indiana jones ?
Code:
I'm using register values as follow :
2130 : $02 -> b1 on for sub screen, math always for b4-5
2131 : $b3 - > math for back/obj/bg1/bG2
2132 for rgb modificaiton with a value between 0 and $1f and b7-5 set to 1
Sub screen for bg2 (and this one is on top for mode 1)
Main screen for bg0/bg1 and objs


Top
 Profile  
 
PostPosted: Sat Jul 12, 2014 12:47 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 788
You can't change the colour of a tiled background with COLDATA; that's for the constant colour. You'd need to modify the CGRAM entries that your tiled background references.

I'm not sure what the original game is doing, but I imagine that at most, changing COLDATA would affect the area where the subscreen BG layer is set to colour #0 (ie: totally transparent). As I understand it, the rule is that you can't do colour math between more than two layers for any one pixel.


Top
 Profile  
 
PostPosted: Sat Jul 12, 2014 10:34 pm 
Offline

Joined: Tue Apr 24, 2012 12:22 pm
Posts: 53
OK, understand. That's strange, no$sns gave me a color for the bg2 value of the circle, not the #0 color. Certainly an issue in it.
I changed the internal circle of bg2 to color #0 and yes, that's change also limonosity of the BG :), so it's ok for me.
Thanks for the reply !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: TmEE and 14 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