Files
comaps/shaders/Metal/debug_rect.metal
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

32 lines
569 B
Metal

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
typedef struct
{
float2 a_position [[attribute(0)]];
} Vertex_T;
typedef struct
{
float4 position [[position]];
} Fragment_T;
typedef struct
{
float4 u_color;
} Uniforms_T;
vertex Fragment_T vsDebugRect(const Vertex_T in [[stage_in]])
{
Fragment_T out;
out.position = float4(in.a_position, 0.0, 1.0);
return out;
}
fragment float4 fsDebugRect(const Fragment_T in [[stage_in]],
constant Uniforms_T & uniforms [[buffer(0)]])
{
return uniforms.u_color;
}