FresnelFX

Hello ,this is a little research about the fresnel effect and the implementation as SHaderFX in gamma.
the technique was inspired by UE4 fresnel shader

There are some minor things with complute float in the code that i will change soon as posible.there is a little bug with computefloats by the moment but works so far so good, Enjoy and throw any comments , ideas etc.
Thanks to tebjan for his great support.
FresnelFX.7z (1.4 MB)

5 Likes

Really cool! For FresnelIn i have no Pins
image

(latest preview .88 )

Check with the latest preview, as i said there are few bugs with compute floats that tebjan told me , works for me in latest one

mhh just installed the latest .88 (proxies) maybe the one before?

me running .83 check if it works and tell me

very odd unziped it again now its working in .88 :) Would be very helpful for me if you would consider commenting the shader im trying to do something similar and kinda clueless. in any case its already super helpful! thx for sharing :)

1 Like

Yes i will include a more clean an guided code for the people in the next release that will include normals input and an invert value output., the weird thing with compute floats is a bug, when you edit the shader and save changes input pins dissappear, if you close gamma and open, they are there .hope will be fixed soon

super useful shader :)

2 Likes

I miss it so much in gamma. is really useful for everyday! enjoy! that looks very nice btw ;)

Here we go! second preview of FresnelFx… some corrections in the ugly code , and cleaner shader.
More to come. please test with latest gamma preview and send your feedback .
would be extremely apreciatted. enjoy!
FresnelFX.7z (1.4 MB)

VL.Fresnel is online with some examples including a rim light character setup. Enjoy :
-nuget install VL.Fresnel

8 Likes

@AKa-visuals i found a bug in your shader code that might lead to the pin issues. you are using streams.Eye but Eye is not part of the streams, it is just a normal uniform input, so just remove the streams and then you should be good. let us know whether that fixes the issues.

1 Like

@tonfilm Oh thats very good news, i was going crazy about the pin thing , i will try asap and let you all know!

yes, maybe check the other variables too. you can use this tool to inspect the base shaders and see what is part of the streams: https://github.com/tebjan/Stride.ShaderExplorer/releases

the general rule is, if the value needs to pass through the shader stages it has the stream keyword, otherwise, it is just a normal input, like Eye, View, etc.

Its a little confuse to find wich variables are stream or not, What are the name of all base shaders? in any case you were right , now the pin thing works allright, i will push a nuget this afternoon with a new version , that also includes Bias and Scale as in UE4 Shader. Thanks!

if you use the EditShaders project, as described here, visual studio will tell you about these kinds of error:
Editing shaders | vvvv gamma documentation

New Version is Uploaded. 1.0.2.1
changelog :
-Fixed Annoying bug with pins.
-Meshnormals changed to WS .Work with SDFs in Fuse now
-Added Scale and bias control.
-Added invert Value .
-nuget install VL.Fresnel

6 Likes