[Effect] Fire Flames

Share your Construct 2 effect files

Post » Tue Jul 14, 2015 6:09 pm

Ported from shadertoy:
https://www.shadertoy.com/view/4slXz2

Screenshot:
Image

Added more than 25 Parameters you can adjust:
Image
Note: Remember to use negative values for fun results! ;)

Added additional things like the option to enable/disable each flame individualy and a final blend.

Download Effects and Demo:
https://dl.dropboxusercontent.com/u/659 ... e/fire.rar

Live Demo:
https://dl.dropboxusercontent.com/u/659 ... index.html
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Tue Jul 14, 2015 8:13 pm

Image

Taken from your demo, it looks different than your screenshot, is that normal?
B
98
S
35
G
29
Posts: 3,139
Reputation: 28,396

Post » Tue Jul 14, 2015 8:26 pm

This is how looks in my preview, but when i run looks like in my screnshots.

The effect runs well on Firefox, Chrome and NW.js on Opera appears a blue square.

You said this is taken from my demo, but from where? The live demo? Your Construct2 preview or runnig? What browser,etc...

I'm using the Beta 209 of Construct2.

When you runs the effects appears ok? ¿?

Edit: This is a videos that how looks on firefox: https://instagram.com/p/5IDK4xAL3i/
(Sorry for the low quality)
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Wed Jul 15, 2015 7:16 pm

@matriax

Sorry for late reply, I'm using shader version is AMD Radeon HD 6550D Direct3D11 vs_5_0 ps_5_0

Also at shadertoy, it looks different such as cartoon flames, what's version yours?
B
98
S
35
G
29
Posts: 3,139
Reputation: 28,396

Post » Wed Jul 15, 2015 7:43 pm

The fireflames effects is the same from shadertoy, i made also the variations. Looks weird on Direct3D but good when WebGL is used, ¿Why? I don't know, i'm new on shaders :P , Maybe @Gigatron can explain what is happen here or look the code and solve it.

As i said in my C2 preview , i mean in the C2 layout, looks a bit weird(Direct3d is used), exactly that you screenshot, but when the effect runs on C2 using NW.js or in the browsers Firefox/Chorme that uses WebGL appears perfectly.

So, when DIrect3D is used looks like you, and when WebGL is used looks like my screenshot.

Also i not understad why in your case are using Direct3D, how are you getting this? NW.js? Browser? Mobile?... Also, have you tested to export to desktop o see with NW.js or chrome, firefox etc...? In all is the same?
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Wed Jul 15, 2015 8:54 pm

Yes I am here ; ok for unknown reason some ST shaders are not running on some GFX cards ...In other word some
gfx cards emulate shaders a bit differently ..
In this case : replace in triangle function : for ATI Cards like me:
btw: i am not an expert on shaders :) but i look the code and meditate... sometimes 2 weeks on one function :)
Code: Select all
float triangle(float t){
      
   //return (fract(t)-flamesP) * sign(fract(t / 2.0)-.9);     <---- replace this line
   return (fract(t)-.5) * sign(fract(t)-.5);                            <---- by this one

}

Image
Running on firefox
Regards
Last edited by Gigatron on Wed Jul 15, 2015 9:16 pm, edited 2 times in total.
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
61
S
20
G
29
Posts: 815
Reputation: 22,093

Post » Wed Jul 15, 2015 9:03 pm

@Gigatron
So you have to add 2 versions of the effect and define which Card is used in order to define the plugin to use?
Image Image
B
23
S
13
G
135
Posts: 871
Reputation: 70,345

Post » Wed Jul 15, 2015 9:07 pm

Don't know , this fx done by matriax..
He can easily add a variable for selecting cards...

If(cards==0.0) then ....
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
61
S
20
G
29
Posts: 815
Reputation: 22,093

Post » Wed Jul 15, 2015 9:12 pm

Wow great! @Gigatron!

Worked! Now with the line change both version works :D

Seems was my fault on the FlamesP variable, sorry! :S , I go to upload the new version, one moment!

Link updated: https://dl.dropboxusercontent.com/u/659 ... e/fire.rar! Please @Joannesalfa test it now ¿Works correct?.
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Wed Jul 15, 2015 9:40 pm

@matriax

Image

That's perfect same... but not at all, for some unknown reason, It cannot run shader in Chrome, besides Firefox and NW.js worked very fine


Console says... Using Canvas 2D renderer WTF???

Edit: Nevermind lol, my chrome just crashed webGL because I was using too many shaders each window and set canvas renderer, this is not errror, it works perfect in chrome, thanks!
B
98
S
35
G
29
Posts: 3,139
Reputation: 28,396

Next

Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests