1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/files/materials/atmosphere.shader

28 lines
618 B
Plaintext
Raw Normal View History

2012-07-06 08:31:48 +00:00
#include "core.h"
#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
shOutput(float, alphaFade)
2012-07-06 08:31:48 +00:00
SH_START_PROGRAM
{
shOutputPosition = shMatrixMult(wvp, shInputPosition);
alphaFade = shInputPosition.z < 150.0 ? 0.0 : 1.0;
2012-07-06 08:31:48 +00:00
}
#else
SH_BEGIN_PROGRAM
shInput(float, alphaFade)
2012-07-11 07:08:55 +00:00
shUniform(float4, atmosphereColour) @shSharedParameter(atmosphereColour)
2012-07-06 08:31:48 +00:00
SH_START_PROGRAM
{
shOutputColour(0) = atmosphereColour * float4(1,1,1,alphaFade);
2012-07-06 08:31:48 +00:00
}
#endif