Jump to content

Glow Shader - How to make it blink (fade in and fade out)


R.E.Z.
 Share

Recommended Posts

Hello,

 

I do work with Glowshaders in my Level.

Is there a possibility, to make the Glow-Light fade in and fade out (Only texture 5)? Like a blinking Light.

 

Great work by shadmar ... Glow Shader:

 

http://www.leadwerks.com/werkspace/files/file/473-glowmapshaders-leadwerks31/

 

Might someone have a hint to me for that purpose?

 

C.U. R.E.Z.smile.pngsmile.pngsmile.png

Leadwerks Standart Edition RTS Creator

Link to comment
Share on other sites

In the frag:

 

find :

vec4 outcolor = ex_color;

after add :

outcolor.a=1.0;

 

find:

fragData2 = vec4(texture(texture5,ex_texcoords0).rgb,materialflags/255.0);

replace it with :

fragData2 = vec4(texture(texture5,ex_texcoords0).rgb*ex_color.a,materialflags/255.0);

 

Then in your app use :

self.entity:SetColor(1,1,1,glowamount) 

 

to set glow amount, and now you can make a blinking or fading glow in code.

  • Upvote 1

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Hello,

 

thank You shadmar for the helpsmile.pngsmile.pngsmile.png

I did find the lines in the shader code.

 

But where do I set the third part, You listed?

 

Then in your app use :

self.entity:SetColor(1,1,1,glowamount)

 

Where do I find or edit this line?

 

C.U. R.E.Z.

Leadwerks Standart Edition RTS Creator

Link to comment
Share on other sites

Hello,

 

I was digging for this line... but still could not find it.

Not in the FPSPlayer.lua nor in other scripts.

Where is this app file located?

Might someone have help for this question?

 

C.U. R.E.Z.

Leadwerks Standart Edition RTS Creator

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...