<commit_before>﻿
#ifndef	__EFFEKSEERRENDERER_COMMON_UTILS_H__
#define	__EFFEKSEERRENDERER_COMMON_UTILS_H__

#include <Effekseer.h>
#include <assert.h>
#include <string.h>
#include <math.h>
#include <array>

#if defined(_M_IX86) || defined(__x86__)
#define EFK_SSE2
#include <emmintrin.h>
#elif defined(__ARM_NEON__)
#define EFK_NEON
#include <arm_neon.h>
#endif

#ifdef _MSC_VER
#include <xmmintrin.h>
#endif

namespace EffekseerRenderer
{

struct DynamicVertex
{
	::Effekseer::Vector3D Pos;
	::Effekseer::Color Col;
	//! packed vector
	::Effekseer::Color Normal;
	//! packed vector
	::Effekseer::Color Tangent;

	union {
		//! UV1 (for template)
		float UV[2];
		float UV1[2];
	};

	float UV2[2];

	void SetColor(const ::Effekseer::Color& color) { Col = color; }
};

struct SimpleVertex
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.R;
		Col[1] = color.G;
		Col[2] = color.B;
		Col[3] = color.A;
	}
};

struct SimpleVertexDX9
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.B;
		Col[1] = color.G;
		Col[2] = color.R;
		Col[3] = color.A;
	}
};

struct VertexDistortion
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	::Effekseer::Vector3D Tangent;
	::Effekseer::Vector3D Binormal;

	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.R;
		Col[1] = color.G;
		Col[2] = color.B;
		Col[3] = color.A;
	}
};

struct VertexDistortionDX9
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	::Effekseer::Vector3D Tangent;
	::Effekseer::Vector3D Binormal;

	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.B;
		Col[1] = color.G;
		Col[2] = color.R;
		Col[3] = color.A;
	}
};
<commit_msg>fixed a bug : Binormal and Tangent is flipped<commit_after>﻿
#ifndef	__EFFEKSEERRENDERER_COMMON_UTILS_H__
#define	__EFFEKSEERRENDERER_COMMON_UTILS_H__

#include <Effekseer.h>
#include <assert.h>
#include <string.h>
#include <math.h>
#include <array>

#if defined(_M_IX86) || defined(__x86__)
#define EFK_SSE2
#include <emmintrin.h>
#elif defined(__ARM_NEON__)
#define EFK_NEON
#include <arm_neon.h>
#endif

#ifdef _MSC_VER
#include <xmmintrin.h>
#endif

namespace EffekseerRenderer
{

struct DynamicVertex
{
	::Effekseer::Vector3D Pos;
	::Effekseer::Color Col;
	//! packed vector
	::Effekseer::Color Normal;
	//! packed vector
	::Effekseer::Color Tangent;

	union {
		//! UV1 (for template)
		float UV[2];
		float UV1[2];
	};

	float UV2[2];

	void SetColor(const ::Effekseer::Color& color) { Col = color; }
};

struct SimpleVertex
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.R;
		Col[1] = color.G;
		Col[2] = color.B;
		Col[3] = color.A;
	}
};

struct SimpleVertexDX9
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.B;
		Col[1] = color.G;
		Col[2] = color.R;
		Col[3] = color.A;
	}
};

struct VertexDistortion
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	::Effekseer::Vector3D Binormal;
	::Effekseer::Vector3D Tangent;
	
	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.R;
		Col[1] = color.G;
		Col[2] = color.B;
		Col[3] = color.A;
	}
};

struct VertexDistortionDX9
{
	::Effekseer::Vector3D Pos;
	uint8_t Col[4];

	union {
		float UV[2];
		//! dummy for template
		float UV2[2];
	};

	::Effekseer::Vector3D Binormal;
	::Effekseer::Vector3D Tangent;
	
	void SetColor(const ::Effekseer::Color& color)
	{
		Col[0] = color.B;
		Col[1] = color.G;
		Col[2] = color.R;
		Col[3] = color.A;
	}
};

{'fraction_non_alphanumeric': 0.16544477028347995, 'fraction_numerical': 0.028347996089931573, 'mean_word_length': 4.084472049689441, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6986547', 'n_tokens_mistral': 1979, 'n_tokens_neox': 1848, 'n_words': 363}