What's new

N64 Glide Plugin

Status
Not open for further replies.
OP
Dave2001

Dave2001

Moderator
Ok, I just ran into the biggest math problem of all time. I need to either figure this out or find a way around it.

This is the way around it:
How can I clamp AND wrap at the same time (like wrap once and then clamp)?

otherwise:
I will need to implement triangle splitting, which probably will slow the plugin down, and it is extremely hard to figure out. (splitting the triangle at the clamp point, not too hard if one, but if many... it's very difficult)
 
OP
Dave2001

Dave2001

Moderator
Ah, I think I found a good way to split the triangles though, I can always use wrapping since it can only wrap on power of two, and then I can manually implement clamping myself.
 

Azimer

Emulator Developer
Moderator
Dave2001 said:
Ah, I think I found a good way to split the triangles though, I can always use wrapping since it can only wrap on power of two, and then I can manually implement clamping myself.

You could always double the texture size then clamp. Where do you find this occurring? I have a breakpoint set up for this condition but never found it. (Assuming you meant mirroring and clamping)
 
OP
Dave2001

Dave2001

Moderator
Ogy: Well, now I'm usually on #Glide64 on EFnet instead of DALnet.


Clamping and mirroring occurs on mario's hat (and other places) in Super Smash Brothers. What it does: it mirrors once, then clamps, so that it can do the other half of the "M", but not go beyond that. Right now it repeats the "M" another half a time.

Also, the stair steps in the mario stage should wrap several times before clamping.
 
Last edited:
OP
Dave2001

Dave2001

Moderator
ok, I think I've figured out how I could do it, but how could I do textures bigger than 256 size without splitting triangles?
 

Reznor007

New member
I'm not sure how Creative did it, but they made an OpenGL driver for Voodoo2 boards that supported 512x512 textures in Quake3. I'm fairly sure they did it by splitting it into 4 256 textures, but I don't know if they split the polygons into 4x as many, or just placed the 4 textures into the normal polygons. Something like that might work.
 

Ogy

3Dfx Fanatic.
ok, emuXhaven board is still down so i'll put my finished compatibility list here, this should have all the (U) games and most (all?) (E) but no JAP games.
 

2fast4u

New member
Ogy said:
ok, emuXhaven board is still down so i'll put my finished compatibility list here, this should have all the (U) games and most (all?) (E) but no JAP games.

holy shit ogy, u sure did a lot of work there. very nice job! :thumbsup:
 
OP
Dave2001

Dave2001

Moderator
Ok, I think I'm going to need to use multi-pass rendering to interpolate between two textures, Glide won't let me just enter a float value to do so. How does multi-pass rendering work? If I render one triangle with .5 alpha and another with .5 alpha, it isn't going to give me .5 alpha total, correct? I don't have an equation to find the correct alpha values yet.
 

icepir8

Moderator
Dave2001,

a = total alpha of the resulting multipass texture.

b = the blend percentage between the two textures.

d = the frame buffer.

t0 = texture 0.

t1 = texture 1.

pass 1 would be:

d = ((t0 * b)* a) + (d * (1 - a))

pass 2 would be:

d = ((t1 * (1 - b)* a) + d

I hope this helps.

Cya,

Icepir8
:tr64:
 
OP
Dave2001

Dave2001

Moderator
Do I need a seperate buffer to do this or can this be done just where I am rendering normally?
 

thomas_callahan

New member
Wow, I just read through the last few days' worth of posts - I can't wait for the next release. I have a PIII 800 and GeForce 2 at home but never had much time there to play games. At work I have a PIII 667 and Voodoo3 and plenty of downtime lately but PJ64 ran like poo with other video plugins on the Voodoo3 so I was prevented from putting that downtime to good use ;)

Thanks for you hard work.
 
OP
Dave2001

Dave2001

Moderator
Yes!!! :) Instead of multipass for texture interpolation, I figured out how to fake the LOD into inserting a float value to the texture combine equation.

in the function:
void grTexDetailControl (GrChipID_t tmu, int detailBias, FxU8 detailScale, float detailMax)

it uses the equation:
b = min( detailMax, max( 0, (detailBias–LOD) << detailScale ) / 255.0 )
where b is the detail factor. Now, if I insert the highest value possible for detailBias and detailScale, it will allow me to use the value of detailMax no matter how far away the object is. Then I just combine the two TMUs with detail factor as the scale:

grTexDetailControl (GR_TMU1, 31, 7, 0.5f);
grTexDetailControl (GR_TMU0, 31, 7, 0.5f);

grTexCombine (GR_TMU1,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_ONE,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_ONE,
FXFALSE,
FXFALSE);
grTexCombine (GR_TMU0,
GR_COMBINE_FUNCTION_BLEND,
GR_COMBINE_FACTOR_DETAIL_FACTOR,
GR_COMBINE_FUNCTION_BLEND,
GR_COMBINE_FACTOR_DETAIL_FACTOR,
FXFALSE,
FXFALSE);

(the 0.5f in grTexDetailControl is the interpolation % from TMU0 to TMU1)

The ground in Zelda works very nicely now, and there was no error due to distance :)

btw, for those of you who don't know what LOD is, it's what causes textures to change as distance changes.
 
Last edited:
OP
Dave2001

Dave2001

Moderator
Wait a minute, isn't that list for the beta? There's no point in releasing a compatibility list for a future version.
 

Reznor007

New member
Dave, have you tested the new LOD code on Voodoo1 and Voodoo Banshee cards? I'm not sure how they would react since they only have 1 TMU.
 

Ogy

3Dfx Fanatic.
Dave2001 said:
Wait a minute, isn't that list for the beta? There's no point in releasing a compatibility list for a future version.

no, it's for 0.04.

i would like to test the new beta and start working on the next list, but unfortunately you didn't give me the current beta:(
 

Remote

Active member
Moderator
A little suggestion, please organize the games in your compatibility list by status, level of playablilty... So instead of looking through a blur... you can instantly see which games that are supported... and perhaps you could add a change log...

Playable...
0-9
A-Z

Errors
0-9
A-Z

Unsupported
0-9
A-Z
 
Status
Not open for further replies.

Top