R.E.Z. Posted June 30, 2014 Posted June 30, 2014 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. Quote Leadwerks Standart Edition RTS Creator
gamecreator Posted June 30, 2014 Posted June 30, 2014 I'm sure there's a better way but maybe you can use a combination of AddPostEffect and ClearPostEffects. Quote
shadmar Posted June 30, 2014 Posted June 30, 2014 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. 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB
Rick Posted June 30, 2014 Posted June 30, 2014 I still wish we had a way to get model instance specific data to shaders that isn't abusing the color field. 3 Quote
R.E.Z. Posted July 1, 2014 Author Posted July 1, 2014 Hello, thank You shadmar for the help 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. Quote Leadwerks Standart Edition RTS Creator
gamecreator Posted July 1, 2014 Posted July 1, 2014 Looks like that's in your Lua code - you change your entity's color and it will change the glow amount. Quote
R.E.Z. Posted July 5, 2014 Author Posted July 5, 2014 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. Quote Leadwerks Standart Edition RTS Creator
Rick Posted July 5, 2014 Posted July 5, 2014 You won't find that line anywhere. He's saying that's the line you have to put in your code somewhere to make this shader work. That's how you control the glow amount when you want to use it. Quote
Recommended Posts
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.