lately, i have found some basic code for a triplanar shader, fixed some issues and made a terrain shader out of it.
finally i got it working on my machine [mac book pro, nvidia geforce 9400M] which is quite exciting as all other triplanar terrain shaders that can be found here on forum do not work on my system.
version 1
the first version of the shader is based on solution provided by nvidia and first mentioned by virror here on the forums. it support forward and deferred rendering and lightmaps, but produces some strange artifacts on bump mapping:
version 2
the second version of the shader is based on farfarer’s approach has much nicer bump mapping, but only supports forward rendering and no lightmaps:
Could you please tell me where you found the triplanar shader code? I only need one for regular meshes ( which will be used for terrain eventually, but a custom solution )
To anyone interested in the triplanar shader thats working on Mac, original source to larsbertram1s demo (by me) can be downloaded here: triplanar shader
There is bumpmapping support as well, but not 100% sure if its working or not though.
after having a closer look at the bump mapping i turned to farfarer’s approach and made his shader work on os x.
unfortunately it does not support lightmapping or deferred rendering… but bump maps look much nicer:
i have been “talking” to virror lately about triplanar shaders and his solution based on a paper by nvidia which was my starting point.
unfortunately this simple an dclean solution does not work well with the bulit in terrain as it does not come with any tangents and the general tangent estimation first provided by chris morris and his bump map shader for terrains is not as accurate as i would need it.
so i switched to farfarer’s approach who has implemented his own lighting function to support nice bumpmapping. i made some tweaks to make it run on mac and it looks really nice but unfortunately it does not support deferred rendering and lightmapping as it out of unity’s lighting pipline…
have a look at my last post. there you will see my implementation of farfarer’s approach.
Works great on my system. You, sir, are a genius; would you plan on releasing the code like your other free shaders? I’ve been scrawling my own system for months been it seems you’ve fixed the bugs I’ve been having. Having your code instead would be a blessing.