Modify the final color output

Hi there,

As the title suggests, how can I modify the final color output , after all the lighting pass and shadow pass are done, on a render texture(in forward path)? In the compiled shader I couldn’t find a pass that actually combine all the forward passes…

Thanks

That would be a postprocessor effect, so requires Pro.

Sorry…but what i meant was that modifying the final color before it was rendered on a render texture, i was intended to do some color encoding inside the shader itself, which should be taken place just before the color was written to the texture/buffer, so this is not a post effect. The post effect will only deal with the decoding etc.

There is no compositing pass. The whole forward approach is built around multiple passes, each of which render to the render target (screen or otherwise).

Thanks for the heads up. :slight_smile:

Another problem is … how is shadow being managed in the forward pass? I didn’t see any code related to shadow mapping… are they rendered as an independent pass per light as well?

Check out Autolight.cginc for the definition of the LIGHT_ATTENUATION macro. It handles everything that makes the lighting equation darker.