// Generated by ShaderCompiler from DefaultSpriteNoTexture.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 DefaultSpriteNoTexture_Vs[] =
R"__SHDR__(#line 1

out vec4 vColor;

uniform mat4 uProjectionMatrix;
uniform mat4 uViewMatrix;

layout (std140) uniform InstanceBlock
{
	mat4 modelMatrix;
	vec4 color;
	vec2 spriteSize;
};

void main()
{
	vec2 aPosition = vec2(1.0 - float(gl_VertexID >> 1), float(gl_VertexID % 2));
	vec4 position = vec4(aPosition.x * spriteSize.x, aPosition.y * spriteSize.y, 0.0, 1.0);

	gl_Position = uProjectionMatrix * uViewMatrix * modelMatrix * position;
	vColor = color;
}
)__SHDR__";
#endif

#if defined(WITH_RHI_GL) && defined(RHI_GL_PROFILE_ES2)
	inline constexpr char DefaultSpriteNoTexture_Vs100[] =
R"__SHDR__(attribute vec2 aQuadCorner;
#line 1

varying vec4 vColor;

uniform mat4 uProjectionMatrix;
uniform mat4 uViewMatrix;

	uniform mat4 modelMatrix;
	uniform vec4 color;
	uniform vec2 spriteSize;

void main()
{
	vec2 aPosition = vec2(1.0 - (1.0 - aQuadCorner.x), aQuadCorner.y);
	vec4 position = vec4(aPosition.x * spriteSize.x, aPosition.y * spriteSize.y, 0.0, 1.0);

	gl_Position = uProjectionMatrix * uViewMatrix * modelMatrix * position;
	vColor = color;
}
)__SHDR__";
#endif

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

#ifdef GL_ES
precision mediump float;
#endif

in vec4 vColor;

out vec4 COLOR;

void main() {
	COLOR = vColor;
}

)__SHDR__";
#endif

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

precision mediump float;

varying vec4 vColor;


void main() {
	vec4 COLOR;
	COLOR = vColor;
	gl_FragColor = COLOR;
}

)__SHDR__";
#endif

	inline constexpr ShaderCompiler::Uniform DefaultSpriteNoTexture_Uniforms[] = {
		{ "uProjectionMatrix", ShaderCompiler::UniformType::Mat4, 0 },
		{ "uViewMatrix", ShaderCompiler::UniformType::Mat4, 0 },
	};

	inline constexpr ShaderCompiler::BlockMember DefaultSpriteNoTexture_Block0_Members[] = {
		{ "modelMatrix", ShaderCompiler::UniformType::Mat4, 0, 0 },
		{ "color", ShaderCompiler::UniformType::Vec4, 0, 64 },
		{ "spriteSize", ShaderCompiler::UniformType::Vec2, 0, 80 },
	};

	inline constexpr ShaderCompiler::UniformBlock DefaultSpriteNoTexture_Blocks[] = {
		{ "InstanceBlock", 96, 0, 3, DefaultSpriteNoTexture_Block0_Members },
	};

	inline constexpr ShaderCompiler::ProgramVariant DefaultSpriteNoTexture_Variants[] = {
		{ "", "",
#if defined(WITH_RHI_GL) && !defined(RHI_GL_PROFILE_ES2)
			DefaultSpriteNoTexture_Vs, DefaultSpriteNoTexture_Fs,
#else
			nullptr, nullptr,
#endif
			2, DefaultSpriteNoTexture_Uniforms, 1, DefaultSpriteNoTexture_Blocks, 0, nullptr, 0, nullptr,
#if defined(WITH_RHI_GL) && defined(RHI_GL_PROFILE_ES2)
			DefaultSpriteNoTexture_Vs100, DefaultSpriteNoTexture_Fs100,
#else
			nullptr, nullptr,
#endif
#if defined(WITH_RHI_D3D11)
			DefaultSpriteNoTexture_VsHlsl, DefaultSpriteNoTexture_FsHlsl,
			DefaultSpriteNoTexture_VsDxbc, DefaultSpriteNoTexture_VsDxbcSize, DefaultSpriteNoTexture_FsDxbc, DefaultSpriteNoTexture_FsDxbcSize,
#else
			nullptr, nullptr,
			nullptr, 0, nullptr, 0,
#endif
#if defined(WITH_RHI_VULKAN)
			DefaultSpriteNoTexture_VkVs, DefaultSpriteNoTexture_VkVsSize, DefaultSpriteNoTexture_VkFs, DefaultSpriteNoTexture_VkFsSize },
#else
			nullptr, 0, nullptr, 0 },
#endif
	};

	inline constexpr ShaderCompiler::Program DefaultSpriteNoTexture = { "DefaultSpriteNoTexture", 0, 1, DefaultSpriteNoTexture_Variants };
}
#endif
