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
B
54
S
20
G
23
Posts: 748
Reputation: 18,756

Post » Thu Dec 10, 2015 8:33 pm

You the man, thanks again :)
B
32
S
13
G
2
Posts: 492
Reputation: 5,040

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
126
S
29
G
73
Posts: 5,089
Reputation: 51,998

Post » Fri Dec 02, 2016 2:01 am

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

Previous

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests