Lux pre integrated Skin shader for unity 5 [RC3]

hi there,

i have just started to port some lux shaders to unity 5 beta (latest tested version: RC3).
the first one is the lux pre integrated skin shader – which got a little update and now supports “deep subsurface scattering” or translucency.

1893505--121907--Lux2_Skinshader_animgif.gif

you can grab the shader from the git repo:
https://github.com/larsbertram69/Lux_2.0

others might follow in the nearby future.

lars

9 Likes

Awesome Lars!

thank you mike.
still some wok to do like solving large scale sss issues when using point or spot lights.
may be the upcoming betas will help (by improving the shadow quality), may be i will have to come with an own solution.

lars

hi there,

soft spot light shadows are done – at least for opengl.
so subsurface scattering looks a bit better for spotlights. nevertheless i am not really sure if it worth adding it as it would cause sampling the shadow texture 25 times instead of just 4 times…
sss for spot lights is applied using depthtexture*depthtexture to smooth it out a little bit more.
but i am still not really convinced by the softened shadows.

if one looks from the light’s direction things are completely different however: using a custom 5x5 pcf shadow filtering will give you real smooth shadows whereas unity’s built in functions will not.

what do you think?
lars

1895391--122063--Lux2_Skinshader_2nd-iteration_ainimgif1.gif

just to compare the edge (as the animated gif more or less made it look the same)

1895391--122061--Lux2_Skinshader_softshadows.png

i have just tested the shader with the latest beta 18 – and it still works!

Hi,
I have tested LuxSkin in Windows 7 with Ub17 and Ub18 but don’t work (always pink)…
the shader error is: “cannot map expression to ps_4_0 instruction set”

strange – as it works fine for me on osx.
i have just updated the git – may be it works now?

Tried now, but unfortunately the same error…

hmm, some more info about the error message could help.
and you could try adding:
#pragma only_renderers d3d9 d3d11 opengl

No,
but “ddx_fine” seems to requires shader model 5
and #pragma target 5.0 solves the problem…

Thanks for your work, I test it now

hi there,
i have managed to reproduce the compiler error.
and as thundertruck said: ps 4 does not like the dx11 “branch” which uses “ddx_fine” instead of “fwidth”.
using:
#if (SHADER_TARGET > 40)
instead of:
#if SHADER_API_D3D11
does the job without adding #pragma target 5.0 which would make the shader not compile for opengl or dx9.

update is in the repo.

does this work with unity 5 reflection probes?

yes

is lux required? And are you porting over the other shaders like eye shaders?

Awesome. Can you create a cloth shader too?

Why would u need that? Cant u just create cloth with the standard unity 5 shader.

1 Like

lux is not required.
and i have started to port the hair shader:
http://forum.unity3d.com/threads/real-time-shadows-on-alpha-blended-geometry-in-unity-beta-18-wip.287979/
others might follow.

lars

1 Like

what would that exactly mean?

1 Like

1 Like

Ops! I added vertex color to this shader and now looks better with my camera
Is the newest version on the github?