forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Transparancy not working?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Sat Nov 04, 2006 11:23 pm    Post subject: Transparancy not working? Reply with quote

when I make this new color TitleGreen = Color.new(21,165,69,50)

And then do screen:fillRect(0,0,177,272,TitleGreen)
The underlying image wich I blitted earlier to screen is not visible, while the alpha value is 50. How come? transparancy blitting is available in 0.15, isn't it?
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Sun Nov 05, 2006 5:06 am    Post subject: Reply with quote

It doesnt work in 2.0 either.
Back to top
View user's profile Send private message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Sun Nov 05, 2006 5:40 pm    Post subject: Reply with quote

romero126 wrote:
It doesnt work in 2.0 either.

That's just stupid. So there is no version that it works in?
I'll have to use a square image then
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Mon Nov 06, 2006 5:10 am    Post subject: Reply with quote

oh it works it just a 0 - 1, On and off. the % transparency must be in the image itself. Its not done through the luaplayer.
Back to top
View user's profile Send private message
SnowyDisposition



Joined: 27 Sep 2006
Posts: 4

PostPosted: Wed Nov 08, 2006 1:34 am    Post subject: Reply with quote

So you're telling me if I go into Photoshop and create a half-transparent green screen 480x272 and blit it to Lua Player with transparency on, it'll work?

I find this highly unlikely.
Back to top
View user's profile Send private message
Altair



Joined: 20 May 2006
Posts: 76
Location: The Netherlands

PostPosted: Wed Nov 08, 2006 10:47 am    Post subject: Reply with quote

Hmmm, works for me. If you use this code to fade in and out, it will fade in and out by using transparency and Im on 0.16 (I think).

The code I posted is unaltered and is made by Soulkiller BTW. I tested it in some altered form but it works.

Code:
credits = Image.load("backgrounds/credits.png")
fader = Image.createEmpty(480,272)
alphaValue = 255
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
while true do
screen:clear()
screen:blit(0,0,credits)
screen:blit(0,0,fader)
if alphaValue > 0 then
alphaValue = alphaValue - 5
else
break
end
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
screen.waitVblankStart()
screen.flip()
end
screen.waitVblankStart(300) -- pause so it dosn't fade in and then imdeiatly fade out
while true do
screen:clear()
screen:blit(0,0,credits)
screen:blit(0,0,fader)
if alphaValue < 255 then
alphaValue = alphaValue + 5
else
break
end
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
screen.waitVblankStart()
screen.flip()
end
Back to top
View user's profile Send private message
romero126



Joined: 24 Dec 2005
Posts: 200

PostPosted: Thu Nov 09, 2006 9:53 am    Post subject: Reply with quote

SnowyDisposition wrote:
So you're telling me if I go into Photoshop and create a half-transparent green screen 480x272 and blit it to Lua Player with transparency on, it'll work?

I find this highly unlikely.


Its exactly what Im saying, PNG files are quite usefull to display transparancy. Full but not partial. Douchebag.
Back to top
View user's profile Send private message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Fri Nov 10, 2006 11:32 pm    Post subject: Reply with quote

[removed]
I posted exactly what romero posted so I removed it
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group