Now you find a solution for unity’s inbuilt terrain grass looking awful! XD Seriously though, if you can make unity’s grass billboards look good, you will own the universe. Looking forward to see if you accept this challenge.
Actually i prevaricate over projects so much (Nothing tying me down) it can change, and i dont really know what the options are! I’m looking for something much like the volume grass shader (I was initially looking for fur but same difference) that would run ok on high end phones (the samsung galaxy s2’s mali being a minimum spec gpu), to be used as carpet and cloth fiber and fur, mainly
I dont really like the way unity does it and i’m facing having to use that anyways because i’m a solo dev so i dont have forever to try and work out something i can implement myself
You seem incredibly talented so maybe this could be up your street, but a performant fur/grass shader that can sacrifice a bit of accuracy or prettiness for a lower price, that would be great, but aware of how long these things take to make, i wouldnt know if you felt it was worth it!
Open GL was serious problem a year ago when I did the grass system. This moment it turns out that it wasn’t problem of hardware/platform but…Unity’s GLSL compiler / optimizer. My new terrain shaders benefits of all optimizations and it don’t crash like before (developing grass). So, would you mind to look at this:
I just disabled “special” OpenGL shader version here, but now it should work on Mac too (and faster). Could you report me how it behaves on your hardware ? I could then make an update to my package so that users don’t need to worry about special OpenGL treatment (as it would work the same on both D3D9/OpenGL platforms).
Looks great , nice implementation. I like how you have used the height of the displacement/height map data to blend between the various textures. I did a similar thing with a terrain texture a couple of years ago but without the parallax. Again looks great!
Only one word… WOW
If you release it, then please just like that without the need to add a colormap. It’s amazing how the Parallax works with even 100 FPS.
I like Larsbertrams Shader too, but I don’t need a colormap (because it’s hard to create colormaps for a tileable terrain without noticeable seams)
Hello Tom, I tried that webplayer and it is working just fine on Mac! Holy sh*t, 300+ fps in fullscreen mode.
However there is no ocluded object to see if everything is working!
Also, I saw on your video that an object to interact with grass must be put inside an especific render layer; Before I buy your grass shader (and this one when it comes out) I need to know, can I costumize a layermask of layers that will interact with the grass?
All my code logic is already based on layers, player can grab and drop objects of some layers, and if I’d have to move objects to the grass layer that would break many things in my code.
To check intersections just go under the tree and see if tree bark at its bottom is properly intersecting my grass (it should).
To make intersections - you just have to reserve one layer mask (precisely speaking one bit in 32bit layer mask) and every object that can intersect grass have to be assigned to this layer. I use render-to-texture camera which just renders everything we need to intersect grass (w/o grass itself - that’s why I use layers). Then I use depth buffer from that camera to check whether grass should be over or under intersecting object. I had to make it this way because Unity generaly can’t write info z buffer in fragment programs (it can be resolved but may affect performance).
The problem is I don’t have Mac… The only OpenGL testing I can make is running Unity in GL mode on Windows. The artifacts I see are difficult to be localized where the problem is - sorry :(. It looks like kind of z-fighting or z-popping (hard, regular, “mesh-like” edges of broken areas) so that I’m not sure if problem is in my shader or it’s just problem of OSX and every terrain replacement shader won’t work (like Wolfos says).
I will have to workaround the layermask limitation, but just got your amazing grass package today.
Hope you can fix this terrain shader, it is amazing too!
Tried it on the Mac (Geforce 650M) I have lying around and it worked fine, without artifacts and a average of 200 fps with all the fancy stuff enabled.