Shader question

For developers using the Construct 2 Javascript SDK

Post » Thu Dec 10, 2015 2:15 pm

@ErekT, @zenox98

I have made a little example to add alpha intensity. For do this , add an uniform float variable like this :

Code: Select all
uniform  float alpha_coef;

and modify last line of glsls file; to
 gl_FragColor.a = (alpha/1.0)-alpha_coef;


and .xml file add:
Code: Select all
   <param>
         <name>Alpha Coef</name>
         <description>Alpha Coef Multiplier</description>
         <type>percent</type>
         <initial>0.01</initial>
         <uniform>alpha_coef</uniform>
      </param>



Finally the result: http://gigatron3k.free.fr/html5/C2/FX/alpha

Hope this will help //
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
56
S
20
G
29
Posts: 797
Reputation: 21,930

Post » Thu Dec 10, 2015 8:33 pm

You the man, thanks again :)
B
33
S
15
G
6
Posts: 509
Reputation: 7,301

Post » Sat Dec 12, 2015 12:04 pm

Ignore my previous posts about it not working.

Re-visited today and it's working. Must be magic or something :)
If your vision so exceeds your ability, then look to something closer.
Moderator
B
129
S
29
G
77
Posts: 5,184
Reputation: 54,273

Post » Fri Dec 02, 2016 2:01 am

still can't get it working :maybe i'm stupid
B
11
S
5
G
5
Posts: 19
Reputation: 3,474

Previous

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest