The Daily Click ::. Forums ::. Klik Coding Help ::. Pixel shader causing MORE undesired transparency effects
 

Post Reply  Post Oekaki 
 

Posted By Message

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
15th August, 2011 at 20:44:26 -

Hi,

When I apply the Zoom pixel shader (from the Complex-Softwares shaders pack) certain areas become semi transparent.

The transparency occurs under all objects with an alpha channel.


I've created a simple mfa to show this.

There are 2 layers. The first, contains the checkered background. The second, contains 2 active objects. A red square and a black square (with an alpha channel)

Image

When you apply the Zoom pixel shader to the layer containing the actives, the alpha channel in the black square causes the red square (an object with no alpha channel nor blend coefficient) to appear transparent under the black square.

Image

This happens simply by changing the effect of the layer from None to Zoom. I really want to use the Zoom effect, but I can't if my alpha channels create a transparent hole to all lower layers.

Ideas anybody?

http://www.whenthereisnoroominhellthedeadwalktheearth.com/MMF/helpmee.mfa


EDIT: This occurs when applying ALL shaders, not just Zoom.


Edited by Chris Burrows

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th August, 2011 at 00:05:25 -

MMF2 currently blends alpha channels a bit wrong. Unfortunately Yves has been trying to fix it for ages but its not forthcoming
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=223896&page=1

Edited by Pixelthief

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
16th August, 2011 at 04:23:43 -

I knew it! That thread explains all. Is there a work around?

I'm trying to create a zoom effect, the zoom shader works perfectly, except for on my alpha channels which are everywhere so I can't use it. Very frustrating!

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th August, 2011 at 10:38:51 -

Unfortunately the only way around would be to rewrite MMF2 in some clever way or get microsoft to update DX9 with that one handy extra function that only exists in DX11. For now, I've been crudely simulating a workaround by hardcoding the alpha transparencies of my objects to be halved when an effect is applied to the frame, which somewhat makes it look 'right' at least in my case, but we're really waiting to see if Yves can solve this issue, since its a pretty big one

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
16th August, 2011 at 15:50:15 -

Oh I see! Well ok, lets raise money for it. I'll chuck in $20. The "COME ON YVES! FIX IT! WE NEED YOU!" fund!

How exactly do you hardcode the alpha transparencies for an object?

At the particular time I want to use a pixel shader effect on a layer, I only have 4 visible objects with alpha channels. Would this be difficult to make look "right"?

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
16th August, 2011 at 15:59:02 -

well you could go into the animations for each object that has an alpha channel, and make every single pixel 50% lerp'd to white. or is it black, i forget. one of the two directions. So if the pixels were (128,128,12, you make them (192,192,192). If they were (192,192,192), you make them (224,224,224), etc. Then just display the different animation depending on whether theres an effect on the frame. It was a lot easier for me since a lot of my objects didn't have alpha channels and just had plain alpha coefficients on the objects, so I only had to adjust a single number

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
   

Post Reply



 



Advertisement

Worth A Click