I
Intuition
Guest
wow nice work Reverend. your a genius!
I found you can't read a surface that you're writing to, ei.Actually we're passing in a texture, take samples from the current fragment and surrounding fragments on that texture and draw the result to a different texture.
In example in the very first blur shader (the very ugly inefficient one) in "obj_blur_1_pass_isoweight_discrete"s draw event we drew a sprite texture to the application surface. So the original texture, the sprite, remains unchanged. Same goes for all other blurs in this series.
Afaik you shouldn't draw to the same texture as the one you're drawing (I don't know for sure, just read you shouldn't). So you shouldn't i.e. do this:
surface_set_target(srf_main);
shader_set(shd_cool_gfx);
draw_surface(srf_main);
shader_reset();
surface_reset_target();
I don't know if you can do that at all, but if you can:
Afaik you can't control the order in which the fragments are drawn. I read somewhere that the cores on the GPU just pick any unprocessed fragment and when they're done pick any other unprocessed fragment. So they're not processed one by one from top left to bottom right or the like if I understood that correctly.
But as I keep mentioning, I'm no pro in shader stuff; just sharing what I learned and read
Didn't think about bright backgrounds - sorryIf you could use different colors in posts, as some of text is unreadable...:
Hey, those look pretty nice!Finally made a video on how to add lights to the day and night shader:
The shader code stays the same.How compatible are the Day-Light tutorials with GMS1? I took a look at your video and it seems you make heavy use of layers.
Not yet. I do have a shockwave video in planning but it'll take probably 6 weeks til i get to that. It does look pretty cool thoughAmazing stuff Reverend, do you have any tutorials on radial distortion, like a shockwave effect?
Would like to distort some explosions, but no idea where to start.
You are a genius.Just added a new Video.
View attachment 23405
In this video we will create a shader to distort a flag image to make it look like waving in the wind.
Unfortunately I can't help you there. I have absolutely no experience with 3D stuff. But if you create a new post on the programming forum and provide a good description of your problem and images, there's a good chance you'll get help. There are a few really great 3D cracks around.Thank you for great work i was viewed some videos its
I have issue with alpha or alpha blend on png transparnt textures such : tree when i draw trees model with shader or default pass through shader the alpha its missed and draw with out alpha this issue was happened with me on android and ios platform but on windows its work fine btw iam talking about 3d mode iam used gms1.4 do you have video dealing with alphablend and shader on android or ios in 3d mode .sorry for long comment and thanks
Hello, can you please explain how pixel interpolation / image scaling works? I can not find the answer for a long time.Just added a new Video.
View attachment 24102
This time is not about coding a shader but about what normal maps for 2D games are so we're pepared for the next video where we'll create a shockwave shader with normal maps.
After the video you can alo have a look at the interactive explanation. It'lll help really understanding normal vectors:
https://reverend-greg.itch.io/normal-maps-explained
But just to make that clear: I don't plan to create a lighting shader using normal maps.
Its really simple with one light. Way more difficult to have multiple lights, make it look good and add shadows and a nice blending and and and ...I know you've said you don't plan to create a lighting shader with normal maps, but I hope you will reconsider sometime down the line.
What do you mean exactly?Hello, can you please explain how pixel interpolation / image scaling works?
I always wanted to make a shader that makes pixels smoother but don't know how they work. You know, the filters in some 8 bit consoles emulators.Its really simple with one light. Way more difficult to have multiple lights, make it look good and add shadows and a nice blending and and and ...
The reason why Im not persuing this is because even if you get the technical part going, creating normal maps for every asset is extremely time consuming and so I dont plan to use normal lighting in any game and thus its something I dont plan to spend time on
What do you mean exactly?