Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

625 B
Raw Blame
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
// SPDX-FileCopyrightText: 2026 Jorrit Rouwe
// SPDX-License-Identifier: MIT

#include "HairCalculateRenderPositionsBindings.h"
#include "HairCommon.h"
#include "HairCalculateRenderPositions.h"

JPH_SHADER_FUNCTION_BEGIN(void, main, cHairPerRenderVertexBatch, 1, 1)
	JPH_SHADER_PARAM_THREAD_ID(tid)
JPH_SHADER_FUNCTION_END
{
	// Check if this is a valid vertex
	uint vtx = tid.x;
	if (vtx >= cNumRenderVertices)
		return;

	float3 out_position = SkinRenderVertex(vtx);

	// Copy the vertex position to the output buffer
	gRenderPositions[vtx] = out_position;
}