Here is the situation:
i have a shader and want to write another shader that is a slight modification of previous one - it takes result from first shader applies some modifications and outputs result.
For example: i have a shader that implements simple diffuse lightning and i want to a have shader that implements diffuse lighting and inverts colors(for example) but i don’t want to reimplement diffuse lightning one more time.
Is there a way for such thing?
Yeah this is an obvious option with obvious shortcomings - insane code duplication. I was hoping that unity shader preprocessor had a way of doing such task in smarter way.
– Goldseeker