I recently bought a Cloud Shadow shader from the Asset Store which basically projects a fake cloud shadow texture onto all objects on screen. It works fine with Perspective camera, but not with the Orthographic one. The author isn’t answering my emails so now I’m trying to fix the shader myself.
I’m a shader newbie and two things have gotten me stumped so far:
How do I ensure the cloud texture is projected from top-down instead of camera view?
Thanks bgolus!
I’ve just checked out Keijiro’s project but I’m having trouble getting it to project a texture instead of the default grid.
I’ve tried adding this line in InverseProjector.cs’s OnRenderImage() method so I could pass in a texture to the shader, but strangely nothing happens after I assigned one? The shader itself seems to have built-in support for a texture.
Well, you’ll probably want to make a whole new shader that’s an amalgam of both, or at least modify the existing cloud shader implementing the orthographic method used in Keijiro’s shader. Mainly don’t use the “Visualize” function in Keijiro’s shader, just use the position it calculates transformed into world space.
Yeah that’s what I’m trying to do, but I have to figure out how the projected texture UVs work in Keijiro’s before I can combine them properly. I’ll dig more into it tonight, thanks