Pages: [1]
  Print  
Author Topic: Is this possible to do with shaders?  (Read 14718 times)
swizzler
Nub


Cakes 0
Posts: 8


« on: December 24, 2018, 04:32:47 AM »

I'm trying to figure out ways to shift colors with shaders, it seems they only let you mess with brightness as far as I can tell in the shader manual. I thought up another possible way to do it, but I can't figure out if it's possible.

It's kind of tough to explain my logic so i've rendered out a 3D view of how I'm trying to construct the shader in blender and broke down the components.



basically I want to borrow the alpha channel from the image the color data image is layered over, but still let the color-wheel image scroll without taking the alpha channel with it.

I'm guessing the answer is "no you can't do this" but I figured i'd ask just in case.
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3775


Trickster God.


« Reply #1 on: December 24, 2018, 05:47:42 AM »

I guess your best bet is to try with triggerable shaders. They were the last feature added in Q3 1.32, and by proxy, OA also supports it. Only recently thanks to our own gamepacks we've started supporting it in the editor proper:

https://github.com/NeonKnightOA/oagamepack

As for how to use these shaders, here's a tutorial: http://www.simonoc.com/pages/articles/trigshaders1.htm
« Last Edit: December 24, 2018, 05:53:41 AM by Neon_Knight » Logged


"Detailed" is nice, but if it gets in the way of clarity, it ceases being a nice addition and becomes a problem. - TVT
Want to contribute? Read this.
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #2 on: December 24, 2018, 07:43:29 PM »

You can do an alphaFunc LT128 and depthWrite with the circle, and do depthFunc equal with your gradient stage, and then the additive blend circle stage after that

Untested unformatted psuedo code follows!!!

        
Code:
mycoolthing
{
        {
         map ball.tga
         alphafunc LT128
         depthWrite
        }
        {
         map colors.tga
         tcMod scale 1 0.01
         tcMod scroll 0 0.5
         depthFunc equal
        }
        {
         map ball.tga
         blendFunc add
         depthFunc equal
        }
}
« Last Edit: December 25, 2018, 08:23:39 AM by fromhell » Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Pages: [1]
  Print  
 
Jump to: