Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

"Hello, since the built-in FX features in GameMaker are affected by the camera, I purchased your Post-Processing FX. After several hours of experimentation, I successfully implemented the v4 'Underwater' effect on a fixed layer (this is the only effect I need). However, I'm currently facing two issues:

  1. The ripple variations in the 'Underwater' effect are still influenced by camera movement. My game uses the common camera-follow-player mechanic, and this visual interference is unacceptable. Did I overlook something? Is there any way to make it immune to camera movement?
  2. I have a pause system that uses the sprite_create_from_surface function when paused. If I want Post-Processing FX to globally take over the game's rendering system (using application_surface_draw_enable(0)), it causes sprite_create_from_surface to fail, resulting in a black background appearing visually during pauses. Do you have any suggestions for modifications?"

Hello!

1 - Just send the camera position to the offset parameters, using .SetEffectParameters()

2 - In this case, instead of using application_surface, use the PPFX surface. You can get the PPFX surface with .GetRenderSurface(), this way you will get the game surface with the effects applied and draw it later when pausing.

Hello, after testing, there are still some issues (likely due to my insufficient understanding of how to use this plugin correctly):

  1. I might not fully understand the correct way to pass OFFSET parameters. I wrote: test_renderer.SetEffectParameters(FF_DISPLACEMAP, [PP_DISPLACEMAP_OFFSET], [obj_camera.x,obj_camera.y]) But this causes an error. I found "Offset X" and "Offset Y" in PP_DISPLACEMAP_OFFSET - could you show me exactly how to use them?

  2. I discovered the black screen issue was actually because my obj_pause disables most objects (including obj_ppfx 😅) when created. Testing shows application_surface still works normally.

The offset parameter needs an array. But since it's just a parameter, you can actually use .SetEffectParamater:

renderer.SetEffectParameter(FF_DISPLACEMAP, PP_DISPLACEMAP_OFFSET, [obj_camera.x, obj_camera.y]);

Unfortunately, despite passing the camera position in real-time via the step event as suggested (tried both obj_camera.x/y and cam_get_view_xy), the water ripple distortion still shifts with camera movement - exactly as shown in the GIF. Clearly I'm missing something critical here. 🤦‍♂️

Hmmm idk but it looks right in my eyes (?), but maybe it was necessary to look at it another way.  See the example of "layers" in the .yyz project, I implemented the camera offset there

After uncommenting the PP_DISPLACEMAP_OFFSET code at the location you specified, I observed that it was also affected by the camera. Upon closer inspection, the PP_SINE_WAVE_OFFSET effect is actually camera-dependent as well. The shaking amplitude intensifies when obj_player moves. Please check if this matches the phenomenon I described? If so, does this meet your expectations?

Yes, the offset is specifically used so that the effect uses the camera as the added position, preventing the effect from also moving when the camera moves.