<commit_before>#ifdef _WIN32

#ifdef __EFFEKSEER_BUILD_DX12__
#include "EffectPlatformDX12.h"
#endif

#include "EffectPlatformDX11.h"
#include "EffectPlatformDX9.h"
#include "EffectPlatformGL.h"
#elif defined(__APPLE__)
#include "EffectPlatformGL.h"
#include "EffectPlatformMetal.h"
#else
#include "EffectPlatformGL.h"
#endif

#ifdef __EFFEKSEER_BUILD_VULKAN__
#include "EffectPlatformVulkan.h"
#endif

#include "../Effekseer/Effekseer/Effekseer.Base.h"
#include "../Effekseer/Effekseer/Noise/CurlNoise.h"
#include "../TestHelper.h"
#include <iostream>

void BasicRuntimeTestPlatform(EffectPlatform* platform, std::string baseResultPath, std::string suffix)
{
	EffectPlatformInitializingParameter param;
	platform->Initialize(param);

	auto single10Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/10/" + name + u".efk").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	auto single14Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/14/" + name + u".efk").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	auto single15Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/15/" + name + u".efkefc").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	auto single16Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/16/" + name + u".efkefc").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	single10Test(u"SimpleLaser", "SimpleLaser");
	single10Test(u"FCurve_Parameters1", "FCurve_Parameters1");
	single10Test(u"Ribbon_Parameters1", "Ribbon_Parameters1");
	single10Test(u"Ring_Parameters1", "Ring_Parameters1");
	single10Test(u"Track_Parameters1", "Track_Parameters1");
	single10Test(u"Sprite_Parameters1", "Sprite_Parameters1");
	single10Test(u"Distortions1", "Distortions1");

	single14Test(u"Model_Parameters1", "Model_Parameters1");
	single15Test(u"Lighing_Parameters1", "Lighing_Parameters1");
	single15Test(u"DynamicParameter1", "DynamicParameter1");
	single15Test(u"Material_Sampler1", "Material_Sampler1");
	single15Test(u"Material_Refraction", "Material_Refraction");
	single15Test(u"Material_WorldPositionOffset", "Material_WorldPositionOffset");
	single15Test(u"BasicRenderSettings_Blend", "BasicRenderSettings_Blend");
	single15Test(u"BasicRenderSettings_Inherit_Color", "BasicRenderSettings_Inherit_Color");
	single15Test(u"ForceFieldLocal_Turbulence1", "ForceFieldLocal_Turbulence1");
	single15Test(u"ForceFieldLocal_Old", "ForceFieldLocal_Old");
	single15Test(u"Material_FresnelRotatorPolarCoords", "Material_FresnelRotatorPolarCoords");

	single15Test(u"Update_Easing", "Update_Easing");
	single15Test(u"Update_MultiModel", "Update_MultiModel");

	single15Test(u"Material_UV1", "Material_UV1");
	single15Test(u"Material_UV2", "Material_UV2");

	{
		single16Test(u"AlphaBlendTexture01", "AlphaBlendTexture01");
		single16Test(u"AlphaCutoffEdgeColor01", "AlphaCutoffEdgeColor01");
		single16Test(u"BasicRenderSettings_Emissive", "BasicRenderSettings_Emissive");
		single16Test(u"Curve01", "Curve01");
		single16Test(u"EdgeFallOff01", "EdgeFallOff01");
		single16Test(u"Flip01", "Flip01");
		single16Test(u"ForceFieldLocal02", "ForceFieldLocal02");
		single16Test(u"Material_EffectScale", "Material_EffectScale");
		single16Test(u"ProcedualModel01", "ProcedualModel01");
		single16Test(u"ProcedualModel02", "ProcedualModel02");
		single16Test(u"TGA01", "TGA01");
	}

	{
		auto cameraMat = platform->GetRenderer()->GetCameraMatrix();

		Effekseer::Matrix44 mat;
		mat.LookAtRH({0, 0, 10}, {0, 0, 0}, {0, 1, 0});
		platform->GetRenderer()->SetCameraMatrix(mat);
		platform->GenerateDepth();

		single16Test(u"SoftParticle01", "SoftParticle01_NotFlipped");

		platform->GetRenderer()->SetCameraMatrix(cameraMat);
	}

	{
		auto cameraMat = platform->GetRenderer()->GetCameraMatrix();

		Effekseer::Matrix44 mat;<commit_msg>Add a test<commit_after>#ifdef _WIN32

#ifdef __EFFEKSEER_BUILD_DX12__
#include "EffectPlatformDX12.h"
#endif

#include "EffectPlatformDX11.h"
#include "EffectPlatformDX9.h"
#include "EffectPlatformGL.h"
#elif defined(__APPLE__)
#include "EffectPlatformGL.h"
#include "EffectPlatformMetal.h"
#else
#include "EffectPlatformGL.h"
#endif

#ifdef __EFFEKSEER_BUILD_VULKAN__
#include "EffectPlatformVulkan.h"
#endif

#include "../Effekseer/Effekseer/Effekseer.Base.h"
#include "../Effekseer/Effekseer/Noise/CurlNoise.h"
#include "../TestHelper.h"
#include <iostream>

void BasicRuntimeTestPlatform(EffectPlatform* platform, std::string baseResultPath, std::string suffix)
{
	EffectPlatformInitializingParameter param;
	platform->Initialize(param);

	auto single10Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/10/" + name + u".efk").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	auto single14Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/14/" + name + u".efk").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	auto single15Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/15/" + name + u".efkefc").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	auto single16Test = [&](const char16_t* name, const char* savename) -> void {
		srand(0);
		platform->Play((GetDirectoryPathAsU16(__FILE__) + u"../../../../TestData/Effects/16/" + name + u".efkefc").c_str());

		for (size_t i = 0; i < 30; i++)
		{
			platform->Update();
		}
		platform->TakeScreenshot((std::string(baseResultPath) + savename + suffix + ".png").c_str());
		platform->StopAllEffects();
	};

	single10Test(u"SimpleLaser", "SimpleLaser");
	single10Test(u"FCurve_Parameters1", "FCurve_Parameters1");
	single10Test(u"Ribbon_Parameters1", "Ribbon_Parameters1");
	single10Test(u"Ring_Parameters1", "Ring_Parameters1");
	single10Test(u"Track_Parameters1", "Track_Parameters1");
	single10Test(u"Sprite_Parameters1", "Sprite_Parameters1");
	single10Test(u"Distortions1", "Distortions1");

	single14Test(u"Model_Parameters1", "Model_Parameters1");
	single15Test(u"Lighing_Parameters1", "Lighing_Parameters1");
	single15Test(u"DynamicParameter1", "DynamicParameter1");
	single15Test(u"Material_Sampler1", "Material_Sampler1");
	single15Test(u"Material_Refraction", "Material_Refraction");
	single15Test(u"Material_WorldPositionOffset", "Material_WorldPositionOffset");
	single15Test(u"BasicRenderSettings_Blend", "BasicRenderSettings_Blend");
	single15Test(u"BasicRenderSettings_Inherit_Color", "BasicRenderSettings_Inherit_Color");
	single15Test(u"ForceFieldLocal_Turbulence1", "ForceFieldLocal_Turbulence1");
	single15Test(u"ForceFieldLocal_Old", "ForceFieldLocal_Old");
	single15Test(u"Material_FresnelRotatorPolarCoords", "Material_FresnelRotatorPolarCoords");

	single15Test(u"Update_Easing", "Update_Easing");
	single15Test(u"Update_MultiModel", "Update_MultiModel");

	single15Test(u"Material_UV1", "Material_UV1");
	single15Test(u"Material_UV2", "Material_UV2");

	{
		single16Test(u"AlphaBlendTexture01", "AlphaBlendTexture01");
		single16Test(u"AlphaCutoffEdgeColor01", "AlphaCutoffEdgeColor01");
		single16Test(u"BasicRenderSettings_Emissive", "BasicRenderSettings_Emissive");
		single16Test(u"Curve01", "Curve01");
		single16Test(u"EdgeFallOff01", "EdgeFallOff01");
		single16Test(u"Flip01", "Flip01");
		single16Test(u"ForceFieldLocal02", "ForceFieldLocal02");
		single16Test(u"Material_EffectScale", "Material_EffectScale");
		single16Test(u"TGA01", "TGA01");
		single16Test(u"ProcedualModel01", "ProcedualModel01");
		single16Test(u"ProcedualModel02", "ProcedualModel02");
		single16Test(u"ProcedualModel03", "ProcedualModel03");
	}

	{
		auto cameraMat = platform->GetRenderer()->GetCameraMatrix();

		Effekseer::Matrix44 mat;
		mat.LookAtRH({0, 0, 10}, {0, 0, 0}, {0, 1, 0});
		platform->GetRenderer()->SetCameraMatrix(mat);
		platform->GenerateDepth();

		single16Test(u"SoftParticle01", "SoftParticle01_NotFlipped");

		platform->GetRenderer()->SetCameraMatrix(cameraMat);
	}

	{
		auto cameraMat = platform->GetRenderer()->GetCameraMatrix();

		Effekseer::Matrix44 mat;
{'fraction_non_alphanumeric': 0.16721922917530047, 'fraction_numerical': 0.04309987567343556, 'mean_word_length': 6.88, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 65, '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': '348458', 'n_tokens_mistral': 3750, 'n_tokens_neox': 3394, 'n_words': 491}