2012-07-06 08:31:48 +00:00
|
|
|
#include "core.h"
|
|
|
|
|
2012-07-11 07:08:55 +00:00
|
|
|
#define MRT @shGlobalSettingBool(mrt_output)
|
2012-07-06 08:31:48 +00:00
|
|
|
|
|
|
|
#ifdef SH_VERTEX_SHADER
|
|
|
|
|
|
|
|
SH_BEGIN_PROGRAM
|
2012-07-11 07:08:55 +00:00
|
|
|
shUniform(float4x4, wvp) @shAutoConstant(wvp, worldviewproj_matrix)
|
2012-07-09 18:14:07 +00:00
|
|
|
|
|
|
|
shColourInput(float4)
|
|
|
|
shOutput(float4, colourPassthrough)
|
2012-07-06 08:31:48 +00:00
|
|
|
|
|
|
|
SH_START_PROGRAM
|
|
|
|
{
|
|
|
|
shOutputPosition = shMatrixMult(wvp, shInputPosition);
|
2012-07-09 18:14:07 +00:00
|
|
|
colourPassthrough = colour;
|
2012-07-06 08:31:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
SH_BEGIN_PROGRAM
|
2012-07-09 18:14:07 +00:00
|
|
|
shInput(float4, colourPassthrough)
|
2012-07-06 08:31:48 +00:00
|
|
|
#if MRT
|
|
|
|
shDeclareMrtOutput(1)
|
|
|
|
#endif
|
2012-07-11 07:08:55 +00:00
|
|
|
shUniform(float4, atmosphereColour) @shSharedParameter(atmosphereColour)
|
2012-07-06 08:31:48 +00:00
|
|
|
|
|
|
|
SH_START_PROGRAM
|
|
|
|
{
|
2012-07-11 00:31:03 +00:00
|
|
|
shOutputColour(0) = colourPassthrough * atmosphereColour;
|
2012-07-20 14:44:03 +00:00
|
|
|
|
|
|
|
shOutputColour(0) = float3(0,0,0,1);
|
2012-07-06 08:31:48 +00:00
|
|
|
|
|
|
|
#if MRT
|
2012-07-11 00:31:03 +00:00
|
|
|
shOutputColour(1) = float4(1,1,1,1);
|
2012-07-06 08:31:48 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|