// Generated by ShaderCompiler from DefaultImGui.shader. Do not edit manually.
#pragma once

#include "ShaderCompilerTypes.h"
#if defined(WITH_RHI_D3D11)
#	include "D3d11GeneratedShaders.h"
#endif
#if defined(WITH_RHI_VULKAN)
#	include "VulkanGeneratedShaders.h"
#endif

#ifndef DOXYGEN_GENERATING_OUTPUT
namespace nCine::ShadersGen
{
#if defined(WITH_RHI_GL) && !defined(RHI_GL_PROFILE_ES2)
	inline constexpr char DefaultImGui_Vs[] =
R"__SHDR__(#line 1

in vec2 aPosition;
in vec2 aTexCoords;
in vec4 aColor;

out vec2 vTexCoords;
out vec4 vColor;

uniform mat4 uGuiProjection;
uniform float uDepth;




void main()
{
	gl_Position = uGuiProjection * vec4(aPosition, uDepth, 1.0);
	vTexCoords = aTexCoords;
	vColor = aColor;
}
)__SHDR__";
#endif

#if defined(WITH_RHI_GL) && defined(RHI_GL_PROFILE_ES2)
	inline constexpr char DefaultImGui_Vs100[] =
R"__SHDR__(#line 1

attribute vec2 aPosition;
attribute vec2 aTexCoords;
attribute vec4 aColor;

varying vec2 vTexCoords;
varying vec4 vColor;

uniform mat4 uGuiProjection;
uniform float uDepth;




void main()
{
	gl_Position = uGuiProjection * vec4(aPosition, uDepth, 1.0);
	vTexCoords = aTexCoords;
	vColor = aColor;
}
)__SHDR__";
#endif

#if defined(WITH_RHI_GL) && !defined(RHI_GL_PROFILE_ES2)
	inline constexpr char DefaultImGui_Fs[] =
R"__SHDR__(#line 1

#ifdef GL_ES
precision mediump float;
#endif

in vec2 vTexCoords;
in vec4 vColor;

uniform sampler2D uTexture;

out vec4 COLOR;

void main() {
	COLOR = vColor * texture(uTexture, vTexCoords);
}

)__SHDR__";
#endif

#if defined(WITH_RHI_GL) && defined(RHI_GL_PROFILE_ES2)
	inline constexpr char DefaultImGui_Fs100[] =
R"__SHDR__(#line 1

precision mediump float;

varying vec2 vTexCoords;
varying vec4 vColor;

uniform sampler2D uTexture;


void main() {
	vec4 COLOR;
	COLOR = vColor * texture2D(uTexture, vTexCoords);
	gl_FragColor = COLOR;
}

)__SHDR__";
#endif

	inline constexpr ShaderCompiler::Uniform DefaultImGui_Uniforms[] = {
		{ "uGuiProjection", ShaderCompiler::UniformType::Mat4, 0 },
		{ "uDepth", ShaderCompiler::UniformType::Float, 0 },
	};

	inline constexpr ShaderCompiler::TextureBinding DefaultImGui_Textures[] = {
		{ "uTexture", 0 },
	};

	inline constexpr ShaderCompiler::Attribute DefaultImGui_Attributes[] = {
		{ "aPosition", ShaderCompiler::UniformType::Vec2, -1 },
		{ "aTexCoords", ShaderCompiler::UniformType::Vec2, -1 },
		{ "aColor", ShaderCompiler::UniformType::Vec4, -1 },
	};

	inline constexpr ShaderCompiler::ProgramVariant DefaultImGui_Variants[] = {
		{ "", "",
#if defined(WITH_RHI_GL) && !defined(RHI_GL_PROFILE_ES2)
			DefaultImGui_Vs, DefaultImGui_Fs,
#else
			nullptr, nullptr,
#endif
			2, DefaultImGui_Uniforms, 0, nullptr, 1, DefaultImGui_Textures, 3, DefaultImGui_Attributes,
#if defined(WITH_RHI_GL) && defined(RHI_GL_PROFILE_ES2)
			DefaultImGui_Vs100, DefaultImGui_Fs100,
#else
			nullptr, nullptr,
#endif
#if defined(WITH_RHI_D3D11)
			DefaultImGui_VsHlsl, DefaultImGui_FsHlsl,
			DefaultImGui_VsDxbc, DefaultImGui_VsDxbcSize, DefaultImGui_FsDxbc, DefaultImGui_FsDxbcSize,
#else
			nullptr, nullptr,
			nullptr, 0, nullptr, 0,
#endif
#if defined(WITH_RHI_VULKAN)
			DefaultImGui_VkVs, DefaultImGui_VkVsSize, DefaultImGui_VkFs, DefaultImGui_VkFsSize },
#else
			nullptr, 0, nullptr, 0 },
#endif
	};

	inline constexpr ShaderCompiler::Program DefaultImGui = { "DefaultImGui", 0, 1, DefaultImGui_Variants };
}
#endif
