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

42 lines
1016 B
Plaintext
Raw Normal View History

2012-07-06 08:31:48 +00:00
#include "core.h"
#define MRT @shPropertyBool(mrt_output)
#ifdef SH_VERTEX_SHADER
SH_BEGIN_PROGRAM
shUniform(float4x4 wvp) @shAutoConstant(wvp, worldviewproj_matrix)
shInput(float2, uv0)
shOutput(float2, UV)
2012-07-11 00:31:03 +00:00
shColourInput(float4)
shOutput(float4, colourPassthrough)
2012-07-06 08:31:48 +00:00
SH_START_PROGRAM
{
2012-07-11 00:31:03 +00:00
2012-07-06 08:31:48 +00:00
shOutputPosition = shMatrixMult(wvp, shInputPosition);
UV = uv0;
}
#else
SH_BEGIN_PROGRAM
shSampler2D(diffuseMap)
shInput(float2, UV)
#if MRT
shDeclareMrtOutput(1)
#endif
shUniform(float4 materialDiffuse) @shAutoConstant(materialDiffuse, surface_diffuse_colour)
shUniform(float4 materialEmissive) @shAutoConstant(materialEmissive, surface_emissive_colour)
SH_START_PROGRAM
{
2012-07-11 00:31:03 +00:00
shOutputColour(0) = float4(1,1,1,materialDiffuse.a) * float4(materialEmissive.xyz, 1) * shSample(diffuseMap, UV);
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