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 

GU_TFX_BLEND

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



Joined: 26 Sep 2005
Posts: 17
Location: London, UK

PostPosted: Wed Oct 12, 2005 10:06 pm    Post subject: GU_TFX_BLEND Reply with quote

Hiya,

I'm having trouble simulating some of the blending modes for the emulator I'm working on. The GPU of the machine I'm emulating has a very flexible blender, which allows doing things like the following:

Code:

OutColour = EnvColour + VertColour * (TexColour - EnvColour)


(i.e. it interpolates between the environment colour and the vertex colour as the texel ranges from 0..1.

As far as I can tell, GU_TFX_BLEND works something like this:

Code:

OutColour = VertColour + TexColour * (EnvColour - VertColour)


I.e. it interpolates between the vertex colour and the environment colour as the texel ranges from 0..1.

It looks like there are only 5 texture blending modes (MODULATE,DECAL,BLEND,REPLACE and ADD). I was wondering if these were just the "useful" subset of all available blending operations, or whether these are the only blending operations supported by the hardware?

I can simulate many of the available blending modes by using a few tricks (like setting the vertex colour to the environment colour, creating copies of textures with specific RGB components etc), but it looks like some of these blending modes are impossible to simulate accurately with the available sceGuTexFunc modes :(

Any help/suggestions appreciated!

Thanks.
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 13, 2005 3:52 am    Post subject: Re: GU_TFX_BLEND Reply with quote

RustyFunkNut wrote:
It looks like there are only 5 texture blending modes (MODULATE,DECAL,BLEND,REPLACE and ADD). I was wondering if these were just the "useful" subset of all available blending operations, or whether these are the only blending operations supported by the hardware?

I think these are all the hardware supports. It's pretty much an implementation of the OpenGL 1.1 texture/blending model, with a few minor extensions.

The lighting model also supports a secondary specular colour which is added to the fragments after texturing, but as far as I know this is only settable by using actual lighting (there's no per-vertex secondary colour). You could also use fog to add a colour term, but I don't know if anyone has worked out the details of how fog works.
Back to top
View user's profile Send private message Visit poster's website
RustyFunkNut



Joined: 26 Sep 2005
Posts: 17
Location: London, UK

PostPosted: Thu Oct 13, 2005 7:46 pm    Post subject: Reply with quote

Cheers. It looks like I'm just going to have to find a way of working with what what's available. Thinking cap engaged!
Back to top
View user's profile Send private message MSN Messenger
ector



Joined: 12 May 2005
Posts: 195

PostPosted: Fri Oct 14, 2005 2:31 am    Post subject: Reply with quote

N64? PSX? :)
_________________
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Back to top
View user's profile Send private message
RustyFunkNut



Joined: 26 Sep 2005
Posts: 17
Location: London, UK

PostPosted: Sat Oct 15, 2005 8:38 pm    Post subject: Reply with quote

Maybe :)
Back to top
View user's profile Send private message MSN Messenger
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Sat Oct 15, 2005 10:19 pm    Post subject: Reply with quote

hello, i am currently working on blend modes
i got the following modes on my todo-list:
Quote:
# Symmetric blend modes:
average, stamp, overlay, soft light, hard light, interpolation, soft dodge, soft burn
# Non symmetric modes:
reflect, glow, freeze, heat
# Dark blend modes:
multiply, darken, color burn, inverse color burn, subtractive
# Bright blend modes:
screen, lighten, color dodge, inverse color dodge, additive
# Antisymmetric blend modes:
difference, negation, exclusion
# Logical blend modes:
XOR
# RGB blend modes:
Red, green and blue
# HSL blend modes:
Hue, saturation, color and lumniosity


greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP 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