It’s just better than normal maps, for example it allows for something that looks like real bricks, but is only a cube model-wise:
Looks cool! Incidentally I looked into a level 11 asset today called uber shader which I didn’t know before and which also does some really nifty tricks, check it out: UBER - Standard Shader Ultra - Community Showcases - Unity Discussions
I really hope Unity brings such techniques to the standard shader.
Uhmmm, last time I checked they are there, you just gotta know how to do it lol. Well maybe not the Steep Parallax, but Parallax is there (with the Standard Shader).
Really? I only saw normal map and heightmap here.
The heaight map can be used to blend in the parallax lol… Convert the height map into a normal map and it will work. At least it did for me, I checked the legacy Parallax vs the heightmap and got the same extruding like results. Just make sure you convert the heightmap to a normal map inside Unity or it won’t look right. It forces me to do that at least lol.
the unity parallax shader doesn’t self-cast shadow, but i think it’s good enough
The standard shader’s parallax effect is so slight it can barely be seen, even after I converted the heightmap into a normal map (as someone here suggested). Is there any workaround, or am I still doing something wrong?
You would need to fork standard shader and modify following functions to your liking:
“Parallax()” from UnityStandfardInput.cginc and “ParallaxOffset1Step()” from UnityStandardUtils.cginc. There’s also “ParallaxOffset()” in UnityCG.cginc.
As far as I can tell, Parallax() handles actual parallax mapping, but it pretty much calls “OParallaxOffset1Step()” function, unless it is running on SM2 hardware (in which case it is disabled.
The problem is, ParallaxOffset1Step() calculates parallax like this:
// Same as ParallaxOffset in Unity CG, except:
// *) precision - half instead of float
half2 ParallaxOffset1Step (half h, half height, half3 viewDir)
{
h = h * height - height/2.0;
half3 v = normalize(viewDir);
v.z += 0.42;
return h * (v.xy / v.z);
}
It shifts texture coordinates based on stored parallax height… and it does this ONCE.
Needless to say, it is nowhere close to what you’d get with steep parallax mapping.
Thank you.