...but I've got some problems there are defines like '#define CUSTOM_PS_DIFFUSE' to replace the default functions but the reliefmapping changes color, alpha, normalmap and depth - all based on a ray intersection.
Do I really have to use one custom function for every single of these?
The problem is that they all need the depth information and doing the intersection for color, alpha, normalmap and depth is just too inefficient
I made a small update which lets you customize the In.Tex.xy in the PixelShader. That way you just have to worry about moving the texcoords around in your custom Parallax Shader and everything else will be done by the ubershader. Use CUSTOM_PS_TEX , float4 Custom_PS_Tex(vsOut In) to access. XY fetches the model's skins, ZW fetches the static shadowmap applied to the model (if there is one) (not implemented yet, will be in a future update).
Quote:
another thing is that this: Code: #define CUSTOM_VS_OUTPUT_EXTEND float3 ViewDir : TEXCOORD5; // View Direction, needed for relief mapping
[...]
float4 Custom_PS_Diffuse(vsOut In, half3 skinAlbedo) { float4 Color = 0;
In.ViewDir = normalize(In.ViewDir);
...results in an 'invalid subscript "ViewDir"' - Error
Works for me, make sure you are putting the #define CUSTOM_VS_OUTPUT in the correct place
Also please don't use TEXCOORD5 if TEXCOORD7 and TEXCOORD6 are still empty. I MIGHT change the ubershader in the future and MIGHT make use of TEXCOORD5 then. By using TEXCOORD7 or TEXCOORD6 the chance is higher that your shader will still work with future updates without giving an error about TEXCOORD5 already in use . If you are using TEXCOORD7 and TEXCOORD6 already then yes: You have to use TEXCOORD5 for additional data.
Quote:
One thing makes me problems. Please check this file. I noticed that the Level normalmaps only works if I added the default WED light?