2012-07-06 10:31:48 +02:00
|
|
|
#include "core.h"
|
|
|
|
|
|
|
|
#ifdef SH_VERTEX_SHADER
|
|
|
|
|
|
|
|
SH_BEGIN_PROGRAM
|
2012-07-11 09:08:55 +02:00
|
|
|
shUniform(float4x4, wvp) @shAutoConstant(wvp, worldviewproj_matrix)
|
2012-07-23 02:54:50 +02:00
|
|
|
shVertexInput(float2, uv0)
|
2012-07-06 10:31:48 +02:00
|
|
|
shOutput(float2, UV)
|
|
|
|
|
|
|
|
SH_START_PROGRAM
|
|
|
|
{
|
|
|
|
shOutputPosition = shMatrixMult(wvp, shInputPosition);
|
|
|
|
UV = uv0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
SH_BEGIN_PROGRAM
|
|
|
|
shSampler2D(diffuseMap)
|
|
|
|
shInput(float2, UV)
|
2012-07-11 09:08:55 +02:00
|
|
|
shUniform(float4, materialDiffuse) @shAutoConstant(materialDiffuse, surface_diffuse_colour)
|
2012-07-13 09:13:12 +02:00
|
|
|
//shUniform(float4, materialEmissive) @shAutoConstant(materialEmissive, surface_emissive_colour)
|
2012-07-06 10:31:48 +02:00
|
|
|
|
|
|
|
SH_START_PROGRAM
|
|
|
|
{
|
2012-07-13 09:13:12 +02:00
|
|
|
shOutputColour(0) = float4(1,1,1,materialDiffuse.a) * shSample(diffuseMap, UV);
|
2012-07-06 10:31:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|