Holy wow this is amazing.
Bookmarked discussion.
Holy wow this is amazing.
Bookmarked discussion.
Sometimes the videos dont show up (almost always from in Codea), but in Safari or Chrome they usually show up.
Ahhh excelent
@Luatee - Are you manually embedding the videos? Sometimes that causes problems. If not, some plugin Simeon included (looks like he removed it, though) would automatically embed it. Anyways, if your not embedding it, if you could link it with text, that’d be great. Thanks!
@Zoyt The videos show up for me, I used the plugin simeon put in the forum for embedding using the url only but sometimes I see white boxes but it’s fine if I change browsers. @TheRogueBatcher I’ll need a few people to do some beta testing for me when I’ve nearly finished. I can link you to my channel I’ll post videos on there but I’ll put all updates on this thread anyway. @Prynok I edited the lightning shader a bit to create the effect and used the ripple shader for the pulse at the end. Thanks for the feedback guys any ideas are welcome!
@Luatee this is very cool, will closely follow your progress !
@Xavier thanks! I will be progressing on this when the aftermath of the news year celebration wears off!
If your asking for beta testers (which it seemed you inferred you were), I’d love to help.
Thanks!
@Zoyt yes I am, thanks!
Hey guys I decided to try to create a glowing wave on objects that are being held by the physics gun and this is what I’ve come up with! Its a shader that’s using a a simple check in rect to discard pixels to create a stroke around the box, anyway take a look (updated video):
http://www.youtube.com/watch?v=VQYkFGCGf8Y
Well I did what I wanted to do but the shader is too slow, it uses conditionals so if the rect gets about half the screen it slows down to 30fps, any suggestions on how to improve this are well appreciated!
Id also love to beta test
Cool effect, but I think we need to see the code to think how to improve it.
I’d also like to be a Beta Tester!
@luatee this is strange that the shader is too slow… What is the cause? The glowing change efffect or the discard? I assume the problem is in the live computation of glowing change, where you use costly functions (like sine?). Then i would:
@Luatee - share the shader code and we’ll have a look at it…
@Ignatz sure, was just changing a few things.
//Default precision qualifier
precision highp float;
//This represents the current texture on the mesh
uniform lowp sampler2D texture;
//The interpolated vertex color for this fragment
varying lowp vec4 vColor;
//The interpolated texture coordinate for this fragment
varying highp vec2 vTexCoord;
uniform highp float time;
uniform highp float freq;
uniform highp vec2 res;
void main(void)
{
highp vec2 tc = vTexCoord.xy-vec2(0.5,0.5);
highp float len = length(tc*2.0);
highp vec2 uv = tc + (tc/len)*freq*vec2(sin(len*5.0-time*10.0)*0.2
,cos(len*5.0-time*10.0)*0.3);
highp vec2 tx = vTexCoord.xy;
highp vec2 py = (-1.0 + 2.0*tx)*res;
if((py.x<res.x-5.0+sin(res.y*tx.y*0.1+time*10.0)*3.0&&py.x>res.x-12.0)
||(py.x>-res.x+5.0+sin(res.y*tx.y*0.1+time*10.0)*3.0&&py.x<-res.x+12.0)
||(py.y<res.y-5.0+sin(res.x*tx.x*0.1+time*10.0)*3.0&&py.y>res.y-12.0)
||py.y>-res.y+5.0+sin(res.x*tx.x*0.1+time*10.0)*3.0&&py.y<-res.y+12.0)
gl_FragColor = vec4(0,0.6,1,1)*(length(uv)*2.0)*(1.0-length(tc*2.0)+
length(res)*0.0005)*3.0;
else
discard;
}
@Jmv38 It is a bit costly. Tried optimising it a bit but only achieved an fps increase of about 3-4…
May I be a beta tester @Luatee
@TheRogueBatcher I’m not going to decide on beta testers just yet, that will be towards the end… This is just the start!
@Luatee I’m not sure how good shaders are at code caching, but maybe precomputing
5.0+sin(res.y*tx.y*0.1+time*10.0)*3.0
and the y version as well will speed things up. It looks to be an expensive op times 4. Also, transpose the subtractions to get rid of the unary negatives.
Every cycle counts.
(It would help if I knew what was going on under the hood when these get compiled… I don’t know what sort of optimizations are applied, if any.)
@Syntonica that sounds like it might help if I put the sin calls in the cpu instead of gpu but I can’t precompute it as tx is changed every pixel on the gpu, that gives it the waves otherwise it’s just lines pulsing in and out.
Edit: Even removing the sin equations only gives me a FPS increase of ~8 depending on how big the shape is.
@Luatee - Very cool effect. Have you tried using 9 slice images for the boxes and such? You’ve probably already planned something for it, but I thought I might as well suggest it.
Thanks!