HLSL How can one pass data between shaders / read existing colour value?
- by RJFalconer
Hello all,
I have 2 HLSL ps2.0 shaders. Simplified, they are:
Shader 1
Reads texture
Outputs colour value based on this texture
Shader 2
Needs to read in existing colour (or have it passed in/read from a register)
Outputs the final colour which is a function of the previous colour
(They need to be different shaders as I've reached the maximum vertex-shader outputs for 1 shader)
My problem is I cannot work out how Shader 2 can access the existing fragment/pixel colour.
Is the only way for shaders to interact really just the alpha blending options? These aren't sufficient if I want to use the colour as input to my function.