Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
162 user(s) are online (151 user(s) are browsing Forums)

Members: 1
Guests: 161

hlt, more...

Support us!

Headlines

 
  Register To Post  

Compositing and color modulation
Just can't stay away
Just can't stay away


See User information
Would anybody happen to have an example about color modulation using CompositeTags()?

Go to top
Re: Compositing and color modulation
Home away from home
Home away from home


See User information
@Capehill

Stupid question time: what do you mean by Colour modulation?

[edit]
(PS knowing how these things can get misread the stupid question is mine not yours)

Googling the term throws up all sorts of things most of which related shading models and stuff (real physical models made of plastic, with enamel paint and so on...)


Go to top
Re: Compositing and color modulation
Just can't stay away
Just can't stay away


See User information
@broadblues

I try to modify texture by ARGB multipliers. Here is some code:

https://sourceforge.net/p/sdl2-amigaos ... render_compositing.c#l754

However, it looks like modulation would be ignored.

Go to top
Re: Compositing and color modulation
Home away from home
Home away from home


See User information
@Capehill

Hmm okay not used that feature, it's not mentioned in the autodoc.

The obvious thing to check is that your flags do really include the COMPFLAG_Color1Modulate option.


Go to top
Re: Compositing and color modulation
Just can't stay away
Just can't stay away


See User information
@Capehill

Have you tried setting COMPFLAG_ForceSoftware? Maybe it's just the driver for your gfxcard that doesn't support the modulate feature?

Note that the software composite code doesn't support vertex arrays though.

Go to top
Re: Compositing and color modulation
Home away from home
Home away from home


See User information
@salass00
Quote:
Have you tried setting COMPFLAG_ForceSoftware? Maybe it's just the driver for your gfxcard that doesn't support the modulate feature?

None of the drivers support this feature. It's not in the autodocs either, so I think that this was a feature that didn't make the final cut. We should probably remove the definitions in the headers to reflect this.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Compositing and color modulation
Just can't stay away
Just can't stay away


See User information
@Hans

There is at least some code for dealing with the COMPFLAG_Color1Modulate flag in the software fallback for Composite() so it's not completely unimplemented.

Maybe it just wasn't a priority to implement in the hardware drivers because nothing needed it at the time?

Go to top
Re: Compositing and color modulation
Not too shy to talk
Not too shy to talk


See User information
As Hans wrote color modulation dont works
The only way to obtain a similar effect is to have a small bitmap (say 4*4 pixels) that you fill with your color then do a transparent CompositeTags to apply this translucent colored rectangle to the area you want to color-modulate
This may works for rectangular surface (ie highlight a button) but for a "sprite" it may be complicated to exclude the transparent parts (=it will need a buffer bitmap and one more CompositeTags )


Alain Thellier

Note: using a (say) 4*4 pixels bitmap will avoid problems with filtering "catching" surrounding (black, non existents) pixels that will happen if you use a 1x1 pixel bitmap.

Note2: I mean use a 4x4 bitmap but composite on the 2x2 inner

Go to top
Re: Compositing and color modulation
Just can't stay away
Just can't stay away


See User information
@thellier

Yeah, I suppose there has to be a secondary bitmap allocated if application requests color modulation for a given texture.

So:

1) original texture x*y
2) "modulator" texture (like 4*4)
3) resulting, "modulated" texture x*y, that will be displayed after magic dust falls

Go to top
Re: Compositing and color modulation
Not too shy to talk
Not too shy to talk


See User information
Note3:
Also the 2x2 pixels may be different colors so used with filtering may serve to create color gradients

Alain Thellier

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project