I have been trying to adapt a very little HLSL old code to the “new” instructions set, however I have no idea about HLSL and I have probably tried without a lot of sense, but reading on the internet.
The code is as simple as this one:
clip( InFinalCoords );
clip( 1.0f - InFinalCoords );
return ( InFinalCoords );
It can be added after the UVs of POM and before entering in the UVs of the Texture Sample.
(It was useful for calculating silhouettes in an old version of Parallax Oclussion Mapping materials), and it still works on the preview mesh! As it perfectly clip the silhouettes of the material at borders. However, if you apply and sabe the material, it will show the next error:
[SM5] error X4532: Cannot map expression to cs_5_0 instruction set
So I have tried some modifications but always without success, showing even different error codes. Please, could you help me with this?
Thank you in advance!