- Home /
Replace Vertex Shader for all Shaders
Hi everyone!
So I'm trying to achieve an Animal Crossing/DeathSpank type curved world effect. From my experimentation a vertex shader is the best way to go here. I've even got it working. The problem is this would mean creating several custom shaders that are duplicates of some of the default shaders, but with my vertex shader.
Is it possible to replace just the vertex shader portion of an existing shader with mine?
I was sort of able to get part of it working with the following code:
Camera.main.SetReplacementShader(curvedWorldShader, "");
Which does give me a curved world like I would expect, however it also replaces the pixel shader with my limited one. Is it possible to replace just the vertex shader or am I going to have to make a whole bunch of custom shaders?
I would be greatful for any input you might have on either solving this problem or an alternative approach to getting a curved world.
Thanks in advance!