Sign in to follow this  
pichou

Rim Effect

Recommended Posts

Cool I didn't know about the fresnelParameters!

To go further, do you think there is a way to mix waterMaterial with the fresnel parameters to obtain a sort of force field? 
Something like that : https://www.youtube.com/watch?v=tB5WoFpWdYQ (hope I won't get ban for sharing a unity video ;) )

 

I have made a test in this playground with no result : http://www.babylonjs-playground.com/#1SLLOJ#386
But maybe the waterMaterial is not the right tool to do that.

Cheers!

Share this post


Link to post
Share on other sites

Hi @Temechon!

I am currently tring to add you force field custom shader in my scene (which looks really great by the way!)

But I need the force field to be also transparent. Do you a way to do that? I am just starting with custom shaders so don't really know all the parameters yet!

Thanks, Pichou

Share this post


Link to post
Share on other sites

I made it work by adding the needAlphaBlending: true attribute in the ShaderMaterial creation! It looks really nice!

Weird thing I noticed though : If my mesh with the shaderMaterial has a visibility of 1, it creates a hole in the canvas. I mean I can see the other html element behind the canvas in the scene.
In order to avoid that I add to put the visibility to 0.2.

ShaderMaterial are awesome, I will continue to add them in my scene! ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.