RetroArch/gfx/drivers/gl_shaders/opaque.cg.h
twinaphex c5b9352c34 Revert "Rename some files"
This reverts commit 03a8bc9875.
2018-11-24 01:26:05 +01:00

35 lines
762 B
C

#include "shaders_common.h"
static const char *stock_cg_gl_program = CG(
struct input
{
float2 tex_coord;
float4 color;
float4 vertex_coord;
uniform float4x4 mvp_matrix;
uniform sampler2D texture;
};
struct vertex_data
{
float2 tex;
float4 color;
};
void main_vertex
(
out float4 oPosition : POSITION,
input IN,
out vertex_data vert
)
{
oPosition = mul(IN.mvp_matrix, IN.vertex_coord);
vert = vertex_data(IN.tex_coord, IN.color);
}
float4 main_fragment(input IN, vertex_data vert, uniform sampler2D s0 : TEXUNIT0) : COLOR
{
return vert.color * tex2D(s0, vert.tex);
}
);