Background transparency

  • Thread starter Thread starter myst6re
  • Start date Start date
Status
Not open for further replies.
M

myst6re

Guest
Hello ! I found a difference between the PC version and the PS version, it's about four screens (kuro7, cosmo2, jtempl and trnad_1). In each sprites, one word coding for transparency can take four values: 0, 1, 2 or 3. This word is at offset 32 in PC sprites, and in "SpriteTP_Blend" (or Section 3) for the PS version:

On PC version

Code: [Select]
Code:
struct spriteInfos { uint16 zz0; //Always 0 int16 destX; int16 destY; uint16 zz1; //Inused uint16 zz2; //Inused uint16 srcX_1; uint16 srcY_1; uint16 srcX_2; uint16 srcY_2; uint16 width; //Inused: 16,32 or invalid value uint16 height; //Inused: 16,32 or invalid value uint16 paletteID; uint16 ID; //Maybe used for Z value uint8 parameter; uint8 state; //flag uint8 blending; //Boolean uint8 zz3; //Boolean uint16 blendingType; <----- HERE uint16 pageID1; uint16 pageID2; //If pageID2 > 0, use srcX_2 and srcY_2 uint16 deph; uint32 Z; uint32 X; //Proportionnal to srcXs uint32 Y; //Proportionnal to srcYs uint16 zz4; //Always 0};
On PS version (based on Cyb page)

Code: [Select]
Code:
struct spritePageInfos{ unsigned page_x:4; // LSB unsigned page_y:1; unsigned blendingType:2; <----- HERE unsigned deph:2; unsigned ZZ:7; // MSB};
In the four screens, value of blendingType word is sometimes 2. In this case, there is no transparency by addition...


  • 0: average ((colorImg+colorNew)/2)
  • 1: additive blending (colorImg+colorNew)
  • 2: subtractive blending (colorNew-colorImg)
  • 3: 25% additive blending (colorImg+0.25*colorNew) [colne_3 -tv-|fship_5 -water-|min71 -tv-|nmkin_1 -buttons-|prisila -lamp-|ujunon4 & 5 -shine ocean-]

On PC, "blendingType=2" is always transparency by addition, but not on PS (left) :
kuro7pc_vs_ps.png


Someone knows how to use blendingType?
 
Last edited:
That is an excellent find!

Blend mode 2 is subtractive blending (color = destination color - source color) on the PS, on the PC version it is just plain broken and never used. I will try to add this feature to the custom driver :-)
 
That is an excellent find!

Blend mode 2 is subtractive blending (color = destination color - source color) on the PS, on the PC version it is just plain broken and never used. I will try to add this feature to the custom driver :-)
This might fix certain graphical errors in the PC version, like the scene where cloud is floating before the bizarro sephiroth fight, where the background appears prematurely.
 
What happens when the value of blending2 is 3? I have not seen any difference with blending2=1, but I think there is one.
 
Great find, seriously I think if we found the real use of that, it can be the open door to the better idea we already channeled in brain ! :)
 
What happens when the value of blending2 is 3? I have not seen any difference with blending2=1, but I think there is one.
Blend mode 3 is a weird one, in some PS emulators it's described as 25% incoming color, on the PC version of FF7 it's source alpha * source color + destination color, where source alpha is 25%.

I've never seen it used anywhere though, but if a field background uses it I could add support for that too.
 
I've never seen it used anywhere though, but if a field background uses it I could add support for that too.
Yes it is used. I made a complete list:

  • colne_3 & min71: tv
  • fship_5: drinking trough for chocobos
  • nmkin_1: buttons for opening doors
  • prisila: lamp
  • ujunon4 & 5: shine ocean
 
I implemented it in palmer just to see how it would turn out and it does look a lot better in those few field scenes that use these different blend modes. The drinking trough no longer looks like a portal to another dimension, yay!

Implementing it in FF7 is going to be a tiny bit more difficult, but I should be able to get it done for the next release.
 
And for blend mode 0 ???? I think it is used, because it's the mode of the window of this store:
3278642362974_jun_w.png
 
Blend mode 0 is 50% incoming color, or in other words source and destination color averaged.
The PC version already supports this in the same way it supports additive blending, texture page 24 and up are assumed to use blend mode 0.
 
Thank you so much for all the help that thou hast given, the next version of makou reactor will opens Backgrounds better. (layer 3/4, default parameters, default z values and... blending ;) )
7798354556553_perfectviewer.png
 
Status
Not open for further replies.
Back
Top