[Effect] Refraction

This forum is currently in read-only mode.
From the Asset Store
Wind effect
$2.49 USD
Animated wind effect for objects, grass, trees, etc.
  • What is it

    Effect : Refraction effect

    Author : H�ctor Barreiro Cabrera

    Minium Pixel Shader : 2.0

    Description

    This effect refracts the objects underneath it through the use of a normalmap texture. This effect is useful for distortioning images to make effects like glass or water refraction. The key difference with the distort effect is that this one the distortion over each axis is controllable through the normal's color channels.

    The channels assigned to each axis are the following:

    - Red   : X
    [ul]
    	[li]Green : Y[/li]
    	[li]Blue  : Z (unused)[/code:3pvs1iil][/li]
    [/ul]
    From there, the color applied on the normal map will determine the amount to displace. 127 (0.5) means no distortion, 255 means the pixel will be displaced to the right, and 0 means the pixel will be displaced to the left.
    
    The amount of displacement is also configurable through the parameter in the effect's properties. It will tell the shader how much the pixel will be displaced when doing a full displacement, and it will be interpolated accordingly.
    
    For a more info on how the normal maps work, refer to the example and/or google for "Normal mapping".
    
    [h2][b]Download[/b][/h2]
    [url=http://www.aethermachine.com/construct/shaders/Refraction.fx]Download the effect.[/url]
    [url=http://www.aethermachine.com/construct/shaders/Refraction.cap]Download the example (Made with Construct 99.4 beta).[/url]
    
    Disclaimer: The example images contained within the example file were not made by me, but downloaded through a Google search. I claim no rights about the images, they belong to their authors.
    
    [h2][b]Screenshots[/b][/h2]
    <img src="http://www.aethermachine.com/construct/shaders/Refraction_1.jpg">
    <img src="http://www.aethermachine.com/construct/shaders/Refraction_2.jpg">
  • That is a really sweet effect. Awesome job

  • Wow very nice effect. Good work!

  • really nice.

  • Great

    Did you deliberately use point filtering for a more pixelly look?

  • Sorry to sound like a noob.

    But how do you install this.

  • <img src="http://steamgauge.com/misc/construct/images/thread_necromancer.png">

  • Sorry to sound like a noob.

    But how do you install this.

    Download the .fx file and place it in the "Effects" folder inside of the Construct folder. You should find the Construct folder under the Scirra folder in Program Files, assuming you didn't change the installation path.

    Lost my Keys - Yes, it's an old topic, but he's asking a question relative to the topic at hand, so there's nothing wrong.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I bet LMK has had that image for ages and just really wanted to use it

  • I bet LMK has had that image for ages and just really wanted to use it

    Years

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)