User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20

Thread: [Request] Saturation mask DX11 with added feature

  1. #11
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,613
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I've added, but it didn't worked correctly between non-premultiplied and premultiplied, I tried fixing it but no idea why it was behaving differently, so I removed the alpha part entirely.
    What will be your resolution? Remember that only objects inside visible area will be processed.

  2. #12
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    goblincolony.com
    Posts
    118
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    1920x1080 and the amount of lights shown at the screen could easily surpass 100+ objects. My project is a type of colony sim/village builder game so I have little control of how many lights being used in terms of leveldesign since it's the player who will control the layout. The theoretical max number of placed lightsources on a single screen would actually amount closer to 1000 but I'm probably going to add a hard limit of around 100 lights max since it would make little sense for the player to place more.
    You mean pixel shaders only process what's actually being drawn on screen? Never thought about it but yeah that makes total sense.

  3. #13
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,613
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Hmm yeah, that's pretty high res.
    Yes, it only process what's on screen.

  4. #14
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    goblincolony.com
    Posts
    118
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Ugh...I'm getting very inconsistant results using various saturation filters. For example this is the difference between Complex-softwares saturation shader (left) and ShaderMask 2 (right)
    Click image for larger version. 

Name:	satdiff.png 
Views:	50 
Size:	28.3 KB 
ID:	31191
    Muddymole/Sketchy's "Color-adjust" saturation gives me third result and of course I get yet another result in the photo editor Gimp.
    I can understand Gimp being different but all the others are in the same enviroment (ie CTF 2.5). Are they using different methods? Surely there's a "correct" way to calculate saturation and if so which is it?

  5. #15
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,613
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    They probably use different methods, yeah, but the shader I did looks exactly like your mockup on the first message here.
    Of course there's a "correct" way, but that would also mean a ton of processing to actually convert the color space twice.

  6. #16
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,613
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Even in Photoshop there's a ton of ways to get greyscale, and some may look better than others, it all depends on what is your goal.

  7. #17
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    goblincolony.com
    Posts
    118
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Yeah sorry my test apps are a mess. I think my initial testing might have been done with C-S shader and then I have switched to muddymole's for the mockup, wrongfully assuming they were the same, which ultimately might have messed up the result I wanted.
    It's hard since I can't show you exactly what I want and also it seems that some colors do produce the same result whereas others dont. I realise this makes it hard to help and apprechiate all your help very much.

    My lighting system has become a real nightmare. I've worked weeks on this testing every method, shader, combinations of shaders, distance-calculated transparency, with and without alpha-channels, rgb-coefficent but I still havent quite found what I'm looking for. I thought saturationbased simple radialgradients would be a fairly straightforward way to get an acceptable result but now I'm not sure...

  8. #18
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by contra View Post
    Ugh...I'm getting very inconsistant results using various saturation filters. Are they using different methods? Surely there's a "correct" way to calculate saturation and if so which is it?
    Yes, they are using different methods, because they are effectively using different color models (there are lots of different color models that contain a saturation component, and chroma is sometimes incorrectly referred to as saturation too).

    The Complex Softwares "saturation" shader calculates a grey value with the same lightness as the original, but with a saturation of zero. It does that by simply finding the average of the red, green and blue components. It then does linear interpolation between the grey and the original color (S is equivalent to S in HSV or HSL color models).

    My "saturation mask" shader does the same, except that it calculates the grey color in a different way, which is perceptually uniform, taking into account the fact that to the human eye, pure green pixels appear almost 6 times as bright as blue pixels, and twice as bright as red pixels (S is equivalent to S in HSI color model).

    My "color adjust" shader (if you can call it mine), I have no idea what's going on - I must have adapted it from a code sample I found on the internet somewhere...

  9. #19
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I actually got a little of the terminology wrong myself in the last post, so it is confusing!
    This example from wikipedia demonstrates the difference pretty well:



    Complex softwares should give a result like 13d.
    The "saturation mask" shader should give a result like 13c.
    The "color adjust" shader should give a result similar to 13c, but it uses a different set of coefficients (rec.709 instead of rec.601, if you want to get technical).

  10. #20
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    goblincolony.com
    Posts
    118
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Right. Thanks for the clarifications, color models is a complex subject. Just to be clear I didn't mean to imply that anyone was doing things "wrong" (thats why I wrote "correct" with citations) since I am aware of the different color models. I meant it more in the way of what's best for my purposes, but I guess that's ultimately for me to decide unless there's some real performance perk one way or the other?

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. [Request] Tile normal map DX11
    By contra in forum Shader Development
    Replies: 30
    Last Post: 14th February 2022, 04:00 PM
  2. [REQUEST] Anaglyph Shader DX11
    By Veinhelm in forum Shader Development
    Replies: 3
    Last Post: 10th February 2022, 11:02 PM
  3. (Request) Array Object with more added features.
    By lootercuster in forum Extension Development
    Replies: 4
    Last Post: 5th May 2015, 06:45 PM
  4. [Request] Added features to Ray Casting Object
    By Disthron in forum Extension Development
    Replies: 31
    Last Post: 29th October 2009, 11:01 PM
  5. [request] Runtime Hue Saturation For ActivePicture
    By MelliGeorgiou in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th November 2006, 06:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •