mirror of
https://github.com/libretro/RetroArch
synced 2024-12-29 12:31:05 +00:00
47 lines
807 B
Plaintext
47 lines
807 B
Plaintext
|
|
/* Default Vertex shader */
|
|
void main_vertex
|
|
(
|
|
float4 position : POSITION,
|
|
float4 color : COLOR,
|
|
float2 texCoord : TEXCOORD0,
|
|
|
|
uniform float4x4 modelViewProj,
|
|
|
|
out float4 oPosition : POSITION,
|
|
out float4 oColor : COLOR,
|
|
out float2 otexCoord : TEXCOORD
|
|
)
|
|
{
|
|
oPosition = mul(modelViewProj, position);
|
|
oColor = color;
|
|
otexCoord = texCoord;
|
|
}
|
|
|
|
|
|
struct output
|
|
{
|
|
float4 color : COLOR;
|
|
};
|
|
|
|
struct input
|
|
{
|
|
float2 video_size;
|
|
float2 texture_size;
|
|
float2 output_size;
|
|
};
|
|
|
|
output main_fragment(float2 texCoord : TEXCOORD0, uniform sampler2D decal : TEXUNIT0, uniform input IN)
|
|
{
|
|
output OUT;
|
|
|
|
float winHeight = IN.output_size.y;
|
|
float4 tex_color = tex2D(decal, texCoord);
|
|
|
|
OUT.color = (1.0 - 0.60 * floor(fmod(texCoord.y * winHeight, 2.0))) * tex_color;
|
|
|
|
return OUT;
|
|
}
|
|
|
|
|