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

in vec2 aPosition;

out vec4 vColor;

uniform mat4 uProjectionMatrix;
uniform mat4 uViewMatrix;

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

void main()
{
	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 DefaultMeshSpriteNoTexture_Vs100[] =
R"__SHDR__(#line 1

attribute vec2 aPosition;

varying vec4 vColor;

uniform mat4 uProjectionMatrix;
uniform mat4 uViewMatrix;

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

void main()
{
	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 DefaultMeshSpriteNoTexture_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 DefaultMeshSpriteNoTexture_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 DefaultMeshSpriteNoTexture_Uniforms[] = {
		{ "uProjectionMatrix", ShaderCompiler::UniformType::Mat4, 0 },
		{ "uViewMatrix", ShaderCompiler::UniformType::Mat4, 0 },
	};

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

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

	inline constexpr ShaderCompiler::Attribute DefaultMeshSpriteNoTexture_Attributes[] = {
		{ "aPosition", ShaderCompiler::UniformType::Vec2, -1 },
	};

	inline constexpr ShaderCompiler::ProgramVariant DefaultMeshSpriteNoTexture_Variants[] = {
		{ "", "",
#if defined(WITH_RHI_GL) && !defined(RHI_GL_PROFILE_ES2)
			DefaultMeshSpriteNoTexture_Vs, DefaultMeshSpriteNoTexture_Fs,
#else
			nullptr, nullptr,
#endif
			2, DefaultMeshSpriteNoTexture_Uniforms, 1, DefaultMeshSpriteNoTexture_Blocks, 0, nullptr, 1, DefaultMeshSpriteNoTexture_Attributes,
#if defined(WITH_RHI_GL) && defined(RHI_GL_PROFILE_ES2)
			DefaultMeshSpriteNoTexture_Vs100, DefaultMeshSpriteNoTexture_Fs100,
#else
			nullptr, nullptr,
#endif
#if defined(WITH_RHI_D3D11)
			DefaultMeshSpriteNoTexture_VsHlsl, DefaultMeshSpriteNoTexture_FsHlsl,
			DefaultMeshSpriteNoTexture_VsDxbc, DefaultMeshSpriteNoTexture_VsDxbcSize, DefaultMeshSpriteNoTexture_FsDxbc, DefaultMeshSpriteNoTexture_FsDxbcSize,
#else
			nullptr, nullptr,
			nullptr, 0, nullptr, 0,
#endif
#if defined(WITH_RHI_VULKAN)
			DefaultMeshSpriteNoTexture_VkVs, DefaultMeshSpriteNoTexture_VkVsSize, DefaultMeshSpriteNoTexture_VkFs, DefaultMeshSpriteNoTexture_VkFsSize },
#else
			nullptr, 0, nullptr, 0 },
#endif
	};

	inline constexpr ShaderCompiler::Program DefaultMeshSpriteNoTexture = { "DefaultMeshSpriteNoTexture", 0, 1, DefaultMeshSpriteNoTexture_Variants };
}
#endif
