import { PIXELFORMAT_DEPTH, PIXELFORMAT_DEPTH16, PIXELFORMAT_RGBA16F, PIXELFORMAT_RGBA32F, PIXELFORMAT_R32F } from '../platform/graphics/constants.js';

const BLEND_SUBTRACTIVE = 0;
const BLEND_ADDITIVE = 1;
const BLEND_NORMAL = 2;
const BLEND_NONE = 3;
const BLEND_PREMULTIPLIED = 4;
const BLEND_MULTIPLICATIVE = 5;
const BLEND_ADDITIVEALPHA = 6;
const BLEND_MULTIPLICATIVE2X = 7;
const BLEND_SCREEN = 8;
const BLEND_MIN = 9;
const BLEND_MAX = 10;
const blendNames = {
		[BLEND_SUBTRACTIVE]: 'SUBTRACTIVE',
		[BLEND_ADDITIVE]: 'ADDITIVE',
		[BLEND_NORMAL]: 'NORMAL',
		[BLEND_NONE]: 'NONE',
		[BLEND_PREMULTIPLIED]: 'PREMULTIPLIED',
		[BLEND_MULTIPLICATIVE]: 'MULTIPLICATIVE',
		[BLEND_ADDITIVEALPHA]: 'ADDITIVEALPHA',
		[BLEND_MULTIPLICATIVE2X]: 'MULTIPLICATIVE2X',
		[BLEND_SCREEN]: 'SCREEN',
		[BLEND_MIN]: 'MIN',
		[BLEND_MAX]: 'MAX'
};
const FOG_NONE = 'none';
const FOG_LINEAR = 'linear';
const FOG_EXP = 'exp';
const FOG_EXP2 = 'exp2';
const FRESNEL_NONE = 0;
const FRESNEL_SCHLICK = 2;
const fresnelNames = {
		[FRESNEL_NONE]: 'NONE',
		[FRESNEL_SCHLICK]: 'SCHLICK'
};
const LAYER_HUD = 0;
const LAYER_GIZMO = 1;
const LAYER_WORLD = 15;
const LAYERID_WORLD = 0;
const LAYERID_DEPTH = 1;
const LAYERID_SKYBOX = 2;
const LAYERID_IMMEDIATE = 3;
const LAYERID_UI = 4;
const LIGHTTYPE_DIRECTIONAL = 0;
const LIGHTTYPE_OMNI = 1;
const LIGHTTYPE_POINT = LIGHTTYPE_OMNI;
const LIGHTTYPE_SPOT = 2;
const LIGHTTYPE_COUNT = 3;
const lightTypeNames = {
		[LIGHTTYPE_DIRECTIONAL]: 'DIRECTIONAL',
		[LIGHTTYPE_OMNI]: 'OMNI',
		[LIGHTTYPE_SPOT]: 'SPOT'
};
const LIGHT_COLOR_DIVIDER = 100;
const LIGHTSHAPE_PUNCTUAL = 0;
const LIGHTSHAPE_RECT = 1;
const LIGHTSHAPE_DISK = 2;
const LIGHTSHAPE_SPHERE = 3;
const lightShapeNames = {
		[LIGHTSHAPE_PUNCTUAL]: 'PUNCTUAL',
		[LIGHTSHAPE_RECT]: 'RECT',
		[LIGHTSHAPE_DISK]: 'DISK',
		[LIGHTSHAPE_SPHERE]: 'SPHERE'
};
const LIGHTFALLOFF_LINEAR = 0;
const LIGHTFALLOFF_INVERSESQUARED = 1;
const lightFalloffNames = {
		[LIGHTFALLOFF_LINEAR]: 'LINEAR',
		[LIGHTFALLOFF_INVERSESQUARED]: 'INVERSESQUARED'
};
const SHADOW_PCF3_32F = 0;
const SHADOW_PCF3 = 0;
const SHADOW_VSM_16F = 2;
const SHADOW_VSM16 = 2;
const SHADOW_VSM_32F = 3;
const SHADOW_VSM32 = 3;
const SHADOW_PCF5_32F = 4;
const SHADOW_PCF5 = 4;
const SHADOW_PCF1_32F = 5;
const SHADOW_PCF1 = 5;
const SHADOW_PCSS_32F = 6;
const SHADOW_PCF1_16F = 7;
const SHADOW_PCF3_16F = 8;
const SHADOW_PCF5_16F = 9;
const shadowTypeInfo = new Map([
		[
				SHADOW_PCF1_32F,
				{
						name: 'PCF1_32F',
						kind: 'PCF1',
						format: PIXELFORMAT_DEPTH,
						pcf: true
				}
		],
		[
				SHADOW_PCF3_32F,
				{
						name: 'PCF3_32F',
						kind: 'PCF3',
						format: PIXELFORMAT_DEPTH,
						pcf: true
				}
		],
		[
				SHADOW_PCF5_32F,
				{
						name: 'PCF5_32F',
						kind: 'PCF5',
						format: PIXELFORMAT_DEPTH,
						pcf: true
				}
		],
		[
				SHADOW_PCF1_16F,
				{
						name: 'PCF1_16F',
						kind: 'PCF1',
						format: PIXELFORMAT_DEPTH16,
						pcf: true
				}
		],
		[
				SHADOW_PCF3_16F,
				{
						name: 'PCF3_16F',
						kind: 'PCF3',
						format: PIXELFORMAT_DEPTH16,
						pcf: true
				}
		],
		[
				SHADOW_PCF5_16F,
				{
						name: 'PCF5_16F',
						kind: 'PCF5',
						format: PIXELFORMAT_DEPTH16,
						pcf: true
				}
		],
		[
				SHADOW_VSM_16F,
				{
						name: 'VSM_16F',
						kind: 'VSM',
						format: PIXELFORMAT_RGBA16F,
						vsm: true
				}
		],
		[
				SHADOW_VSM_32F,
				{
						name: 'VSM_32F',
						kind: 'VSM',
						format: PIXELFORMAT_RGBA32F,
						vsm: true
				}
		],
		[
				SHADOW_PCSS_32F,
				{
						name: 'PCSS_32F',
						kind: 'PCSS',
						format: PIXELFORMAT_R32F,
						pcss: true
				}
		]
]);
const SHADOW_CASCADE_0 = 1;
const SHADOW_CASCADE_1 = 2;
const SHADOW_CASCADE_2 = 4;
const SHADOW_CASCADE_3 = 8;
const SHADOW_CASCADE_ALL = 255;
const BLUR_BOX = 0;
const BLUR_GAUSSIAN = 1;
const PARTICLESORT_NONE = 0;
const PARTICLESORT_DISTANCE = 1;
const PARTICLESORT_NEWER_FIRST = 2;
const PARTICLESORT_OLDER_FIRST = 3;
const PARTICLEMODE_GPU = 0;
const PARTICLEMODE_CPU = 1;
const EMITTERSHAPE_BOX = 0;
const EMITTERSHAPE_SPHERE = 1;
const PARTICLEORIENTATION_SCREEN = 0;
const PARTICLEORIENTATION_WORLD = 1;
const PARTICLEORIENTATION_EMITTER = 2;
const PROJECTION_PERSPECTIVE = 0;
const PROJECTION_ORTHOGRAPHIC = 1;
const RENDERSTYLE_SOLID = 0;
const RENDERSTYLE_WIREFRAME = 1;
const RENDERSTYLE_POINTS = 2;
const CUBEPROJ_NONE = 0;
const CUBEPROJ_BOX = 1;
const cubemaProjectionNames = {
		[CUBEPROJ_NONE]: 'NONE',
		[CUBEPROJ_BOX]: 'BOX'
};
const DETAILMODE_MUL = 'mul';
const DETAILMODE_ADD = 'add';
const DETAILMODE_SCREEN = 'screen';
const DETAILMODE_OVERLAY = 'overlay';
const DETAILMODE_MIN = 'min';
const DETAILMODE_MAX = 'max';
const GAMMA_NONE = 0;
const GAMMA_SRGB = 1;
const gammaNames = {
		[GAMMA_NONE]: 'NONE',
		[GAMMA_SRGB]: 'SRGB'
};
const TONEMAP_LINEAR = 0;
const TONEMAP_FILMIC = 1;
const TONEMAP_HEJL = 2;
const TONEMAP_ACES = 3;
const TONEMAP_ACES2 = 4;
const TONEMAP_NEUTRAL = 5;
const TONEMAP_NONE = 6;
const tonemapNames = [
		'LINEAR',
		'FILMIC',
		'HEJL',
		'ACES',
		'ACES2',
		'NEUTRAL',
		'NONE'
];
const SPECOCC_NONE = 0;
const SPECOCC_AO = 1;
const SPECOCC_GLOSSDEPENDENT = 2;
const specularOcclusionNames = {
		[SPECOCC_NONE]: 'NONE',
		[SPECOCC_AO]: 'AO',
		[SPECOCC_GLOSSDEPENDENT]: 'GLOSSDEPENDENT'
};
const REFLECTIONSRC_NONE = 'none';
const REFLECTIONSRC_ENVATLAS = 'envAtlas';
const REFLECTIONSRC_ENVATLASHQ = 'envAtlasHQ';
const REFLECTIONSRC_CUBEMAP = 'cubeMap';
const REFLECTIONSRC_SPHEREMAP = 'sphereMap';
const reflectionSrcNames = {
		[REFLECTIONSRC_NONE]: 'NONE',
		[REFLECTIONSRC_ENVATLAS]: 'ENVATLAS',
		[REFLECTIONSRC_ENVATLASHQ]: 'ENVATLASHQ',
		[REFLECTIONSRC_CUBEMAP]: 'CUBEMAP',
		[REFLECTIONSRC_SPHEREMAP]: 'SPHEREMAP'
};
const AMBIENTSRC_AMBIENTSH = 'ambientSH';
const AMBIENTSRC_ENVALATLAS = 'envAtlas';
const AMBIENTSRC_CONSTANT = 'constant';
const ambientSrcNames = {
		[AMBIENTSRC_AMBIENTSH]: 'AMBIENTSH',
		[AMBIENTSRC_ENVALATLAS]: 'ENVALATLAS',
		[AMBIENTSRC_CONSTANT]: 'CONSTANT'
};
const SHADERDEF_NOSHADOW = 1;
const SHADERDEF_SKIN = 2;
const SHADERDEF_UV0 = 4;
const SHADERDEF_UV1 = 8;
const SHADERDEF_VCOLOR = 16;
const SHADERDEF_INSTANCING = 32;
const SHADERDEF_LM = 64;
const SHADERDEF_DIRLM = 128;
const SHADERDEF_SCREENSPACE = 256;
const SHADERDEF_TANGENTS = 512;
const SHADERDEF_MORPH_POSITION = 1024;
const SHADERDEF_MORPH_NORMAL = 2048;
const SHADERDEF_LMAMBIENT = 4096;
const SHADERDEF_MORPH_TEXTURE_BASED_INT = 8192;
const SHADERDEF_BATCH = 16384;
const SHADOWUPDATE_NONE = 0;
const SHADOWUPDATE_THISFRAME = 1;
const SHADOWUPDATE_REALTIME = 2;
const MASK_AFFECT_DYNAMIC = 1;
const MASK_AFFECT_LIGHTMAPPED = 2;
const MASK_BAKE = 4;
const SHADER_FORWARD = 0;
const SHADER_PREPASS = 1;
const SHADER_SHADOW = 2;
const SHADER_PICK = 3;
const SHADERPASS_FORWARD = 'forward';
const SHADERPASS_ALBEDO = 'debug_albedo';
const SHADERPASS_WORLDNORMAL = 'debug_world_normal';
const SHADERPASS_OPACITY = 'debug_opacity';
const SHADERPASS_SPECULARITY = 'debug_specularity';
const SHADERPASS_GLOSS = 'debug_gloss';
const SHADERPASS_METALNESS = 'debug_metalness';
const SHADERPASS_AO = 'debug_ao';
const SHADERPASS_EMISSION = 'debug_emission';
const SHADERPASS_LIGHTING = 'debug_lighting';
const SHADERPASS_UV0 = 'debug_uv0';
const SPRITE_RENDERMODE_SIMPLE = 0;
const SPRITE_RENDERMODE_SLICED = 1;
const SPRITE_RENDERMODE_TILED = 2;
const spriteRenderModeNames = {
		[SPRITE_RENDERMODE_SIMPLE]: 'SIMPLE',
		[SPRITE_RENDERMODE_SLICED]: 'SLICED',
		[SPRITE_RENDERMODE_TILED]: 'TILED'
};
const BAKE_COLOR = 0;
const BAKE_COLORDIR = 1;
const VIEW_CENTER = 0;
const VIEW_LEFT = 1;
const VIEW_RIGHT = 2;
const SORTMODE_NONE = 0;
const SORTMODE_MANUAL = 1;
const SORTMODE_MATERIALMESH = 2;
const SORTMODE_BACK2FRONT = 3;
const SORTMODE_FRONT2BACK = 4;
const SORTMODE_CUSTOM = 5;
const ASPECT_AUTO = 0;
const ASPECT_MANUAL = 1;
const ORIENTATION_HORIZONTAL = 0;
const ORIENTATION_VERTICAL = 1;
const SKYTYPE_INFINITE = 'infinite';
const SKYTYPE_BOX = 'box';
const SKYTYPE_DOME = 'dome';
const DITHER_NONE = 'none';
const DITHER_BAYER8 = 'bayer8';
const DITHER_BLUENOISE = 'bluenoise';
const DITHER_IGNNOISE = 'ignnoise';
const ditherNames = {
		[DITHER_NONE]: 'NONE',
		[DITHER_BAYER8]: 'BAYER8',
		[DITHER_BLUENOISE]: 'BLUENOISE',
		[DITHER_IGNNOISE]: 'IGNNOISE'
};
const EVENT_PRERENDER = 'prerender';
const EVENT_POSTRENDER = 'postrender';
const EVENT_PRERENDER_LAYER = 'prerender:layer';
const EVENT_POSTRENDER_LAYER = 'postrender:layer';
const EVENT_PRECULL = 'precull';
const EVENT_POSTCULL = 'postcull';
const EVENT_CULL_END = 'cull:end';

export { AMBIENTSRC_AMBIENTSH, AMBIENTSRC_CONSTANT, AMBIENTSRC_ENVALATLAS, ASPECT_AUTO, ASPECT_MANUAL, BAKE_COLOR, BAKE_COLORDIR, BLEND_ADDITIVE, BLEND_ADDITIVEALPHA, BLEND_MAX, BLEND_MIN, BLEND_MULTIPLICATIVE, BLEND_MULTIPLICATIVE2X, BLEND_NONE, BLEND_NORMAL, BLEND_PREMULTIPLIED, BLEND_SCREEN, BLEND_SUBTRACTIVE, BLUR_BOX, BLUR_GAUSSIAN, CUBEPROJ_BOX, CUBEPROJ_NONE, DETAILMODE_ADD, DETAILMODE_MAX, DETAILMODE_MIN, DETAILMODE_MUL, DETAILMODE_OVERLAY, DETAILMODE_SCREEN, DITHER_BAYER8, DITHER_BLUENOISE, DITHER_IGNNOISE, DITHER_NONE, EMITTERSHAPE_BOX, EMITTERSHAPE_SPHERE, EVENT_CULL_END, EVENT_POSTCULL, EVENT_POSTRENDER, EVENT_POSTRENDER_LAYER, EVENT_PRECULL, EVENT_PRERENDER, EVENT_PRERENDER_LAYER, FOG_EXP, FOG_EXP2, FOG_LINEAR, FOG_NONE, FRESNEL_NONE, FRESNEL_SCHLICK, GAMMA_NONE, GAMMA_SRGB, LAYERID_DEPTH, LAYERID_IMMEDIATE, LAYERID_SKYBOX, LAYERID_UI, LAYERID_WORLD, LAYER_GIZMO, LAYER_HUD, LAYER_WORLD, LIGHTFALLOFF_INVERSESQUARED, LIGHTFALLOFF_LINEAR, LIGHTSHAPE_DISK, LIGHTSHAPE_PUNCTUAL, LIGHTSHAPE_RECT, LIGHTSHAPE_SPHERE, LIGHTTYPE_COUNT, LIGHTTYPE_DIRECTIONAL, LIGHTTYPE_OMNI, LIGHTTYPE_POINT, LIGHTTYPE_SPOT, LIGHT_COLOR_DIVIDER, MASK_AFFECT_DYNAMIC, MASK_AFFECT_LIGHTMAPPED, MASK_BAKE, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, PARTICLEMODE_CPU, PARTICLEMODE_GPU, PARTICLEORIENTATION_EMITTER, PARTICLEORIENTATION_SCREEN, PARTICLEORIENTATION_WORLD, PARTICLESORT_DISTANCE, PARTICLESORT_NEWER_FIRST, PARTICLESORT_NONE, PARTICLESORT_OLDER_FIRST, PROJECTION_ORTHOGRAPHIC, PROJECTION_PERSPECTIVE, REFLECTIONSRC_CUBEMAP, REFLECTIONSRC_ENVATLAS, REFLECTIONSRC_ENVATLASHQ, REFLECTIONSRC_NONE, REFLECTIONSRC_SPHEREMAP, RENDERSTYLE_POINTS, RENDERSTYLE_SOLID, RENDERSTYLE_WIREFRAME, SHADERDEF_BATCH, SHADERDEF_DIRLM, SHADERDEF_INSTANCING, SHADERDEF_LM, SHADERDEF_LMAMBIENT, SHADERDEF_MORPH_NORMAL, SHADERDEF_MORPH_POSITION, SHADERDEF_MORPH_TEXTURE_BASED_INT, SHADERDEF_NOSHADOW, SHADERDEF_SCREENSPACE, SHADERDEF_SKIN, SHADERDEF_TANGENTS, SHADERDEF_UV0, SHADERDEF_UV1, SHADERDEF_VCOLOR, SHADERPASS_ALBEDO, SHADERPASS_AO, SHADERPASS_EMISSION, SHADERPASS_FORWARD, SHADERPASS_GLOSS, SHADERPASS_LIGHTING, SHADERPASS_METALNESS, SHADERPASS_OPACITY, SHADERPASS_SPECULARITY, SHADERPASS_UV0, SHADERPASS_WORLDNORMAL, SHADER_FORWARD, SHADER_PICK, SHADER_PREPASS, SHADER_SHADOW, SHADOWUPDATE_NONE, SHADOWUPDATE_REALTIME, SHADOWUPDATE_THISFRAME, SHADOW_CASCADE_0, SHADOW_CASCADE_1, SHADOW_CASCADE_2, SHADOW_CASCADE_3, SHADOW_CASCADE_ALL, SHADOW_PCF1, SHADOW_PCF1_16F, SHADOW_PCF1_32F, SHADOW_PCF3, SHADOW_PCF3_16F, SHADOW_PCF3_32F, SHADOW_PCF5, SHADOW_PCF5_16F, SHADOW_PCF5_32F, SHADOW_PCSS_32F, SHADOW_VSM16, SHADOW_VSM32, SHADOW_VSM_16F, SHADOW_VSM_32F, SKYTYPE_BOX, SKYTYPE_DOME, SKYTYPE_INFINITE, SORTMODE_BACK2FRONT, SORTMODE_CUSTOM, SORTMODE_FRONT2BACK, SORTMODE_MANUAL, SORTMODE_MATERIALMESH, SORTMODE_NONE, SPECOCC_AO, SPECOCC_GLOSSDEPENDENT, SPECOCC_NONE, SPRITE_RENDERMODE_SIMPLE, SPRITE_RENDERMODE_SLICED, SPRITE_RENDERMODE_TILED, TONEMAP_ACES, TONEMAP_ACES2, TONEMAP_FILMIC, TONEMAP_HEJL, TONEMAP_LINEAR, TONEMAP_NEUTRAL, TONEMAP_NONE, VIEW_CENTER, VIEW_LEFT, VIEW_RIGHT, ambientSrcNames, blendNames, cubemaProjectionNames, ditherNames, fresnelNames, gammaNames, lightFalloffNames, lightShapeNames, lightTypeNames, reflectionSrcNames, shadowTypeInfo, specularOcclusionNames, spriteRenderModeNames, tonemapNames };
