Art

Underwater Effect 2/2 – Wave Distortion Shader



In this two-part tutorial you’ll learn how to use Shadertoy shaders in GameMaker.

In part one we have adapted a godray shader to simulate light falling through the ocean surface.

In this second part we’ll apply a wave distortion effect to the application surface.

Part 1: https://youtu.be/gBnpBQCvzyI

The finished project file: https://www.dropbox.com/s/q7cn04b5zoz8guo/underwater_effect.gmz?dl=0

GameMaker Tutorial Box

Source

Similar Posts

15 thoughts on “Underwater Effect 2/2 – Wave Distortion Shader
  1. Good tutorial, thank you. But if you switch your game to fullscreen, the view with the shader is fixed to the left side of the screen. How can I fix this to be centralized in the middle of the screen?

  2. Hi, hi! Totally new to shaders. Following along with your tutorial, and I got this on the compile, where yours works.

    Error : [F]Shader_shaderTesting(37) : '' : syntax error
    I can't work out what this means. Obviously I've done something wrong, but being that this is the first time I've ever touched a shader I'm not seeing what.
    Google hasn't been helpful, mostly 'cause I'm not sure where I need to look or what it is I should google. Can you or someone else give me a hint?

  3. I see you haven't posted any new videos lately, but I thought I should chime in and say this tutorial is a godsend for people starting out on shaders! Thank you for spending some time on creating it and I hope to see more on this subject in the future, there's not enough shader tutorials around!

  4. Hi, how would you be able to apply this effect to a sprite rather than a surface?

    (What I'm doing is replacing

    texture_set_stage(u_texture_water, surface_get_texture(application_surface));

    with

    texture_set_stage(u_texture_water, sprite_get_texture(spr_character,0));

    )

    But it just glitches the screen.

  5. How can I change the DistMax variables in real time? I tried doing the same thing as with iTime and iResolution but nothing happens, I expect because they're declared using '#define' instead of 'uniform float'?

Comments are closed.

WP2Social Auto Publish Powered By : XYZScripts.com