tag:blogger.com,1999:blog-5540340668858020212.post2246254119722068011..comments2024-03-10T21:56:24.821-07:00Comments on Game Up! Game Development Blog: GLSL Electricity ShaderSolarLunehttp://www.blogger.com/profile/16532428857445699165noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5540340668858020212.post-11586717838199505852011-11-01T16:47:52.289-07:002011-11-01T16:47:52.289-07:00That's VERY interesting. I should experiment w...That's VERY interesting. I should experiment with this as well.<br /><br />@Riyuzakisan - Your code that sets vtexcoord = position.xy doesn't make the flame start at the bottom of the plane for me... I wonder what's wrong?SolarLunehttps://www.blogger.com/profile/16532428857445699165noreply@blogger.comtag:blogger.com,1999:blog-5540340668858020212.post-67507085117108898802011-10-31T14:32:55.304-07:002011-10-31T14:32:55.304-07:00@SolarLune: Thanks for posting the update, works n...@SolarLune: Thanks for posting the update, works nicely!<br /><br />@Saeblundr: Just tried that out, it's a pretty interesting modification. I've been messing around with the code as well and came up with a similar effect.<br /><br />In the Vertex Shader:<br />vtexcoord = position.xy;<br />vtexcoord.y -= 1; // add this line to make the flame start at the bottom of the plane<br /><br />Changing -= to += would make the flame switch to the top side and face down.<br />Also, changing the order of "xy" to "yx" in "position.xy" of the code above rotates the effect 90 degrees.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5540340668858020212.post-60148255172225822522011-10-31T13:47:48.594-07:002011-10-31T13:47:48.594-07:00Had a play last night to try and make it work on a...Had a play last night to try and make it work on a sphere or other shapes...<br /><br />Not much success, but did find if you replace (in vertex shader)<br /> vtexcoord = position.xyz;<br />with <br /> vtexcoord = gl_MultiTexCoord0.xy;<br />and (in frag shader)<br /> vec4 color = vec4(0.965, 0.634, 1.0, 1.0); // <br />purple<br />with<br /> vec4 color = vec4(0.965, 0.5, 0.0, 1.0); //fire?<br /><br />it would be reasonable for a low flame? ^_^Saeblundrhttps://www.blogger.com/profile/13333565012566364217noreply@blogger.comtag:blogger.com,1999:blog-5540340668858020212.post-73108745775194729942011-10-29T22:52:17.425-07:002011-10-29T22:52:17.425-07:00Doh. Totally forgot to pack the noise texture in. ...Doh. Totally forgot to pack the noise texture in. X( I'll upload the fixed version.SolarLunehttps://www.blogger.com/profile/16532428857445699165noreply@blogger.comtag:blogger.com,1999:blog-5540340668858020212.post-40217758717241127812011-10-29T22:39:32.937-07:002011-10-29T22:39:32.937-07:00The audio quality sounds much better now in the vi...The audio quality sounds much better now in the video with that new microphone.<br /><br />Unfortunately, the script doesn't seem to be working for me in the original file. Not exactly sure what's going on there, but the texture effect remains static (no pun intended) and doesn't change instead of acting like electricity, as it does in this video. Pretty cool effect, though.<br /><br />Here's an image of what's going on in my file:<br />http://i.imgur.com/DsGfL.pngAnonymousnoreply@blogger.com