- Home /
Is there a way to enable shader pass from code?
I've got a sinple vert/frag shader for rendering beam effects. I'd like to be able to draw multiple beams in the same shader. Right now I do this by simply duplicating the entirety of the single beam code and tweaking some values for offsets. I'd prefer to be able to do this by (a) calling the same pass multiple times with different variables or (b) writing the shader with multiple passes and allowing code to decide how many passes to draw.
Your answer
Follow this Question
Related Questions
Parsing values in multipass cg shader 0 Answers
Forcing Multi-Pass shader to use Deferred passes instead of Forward passes? 1 Answer
Shader - Share values between different pass 0 Answers
Get color of pixel before pass: prefer cg, shaderlab is last resort 0 Answers
How to force the compilation of a shader in Unity? 5 Answers