no engine anymore

This commit is contained in:
2025-07-30 23:53:26 +03:00
parent 8a29e6b86f
commit 395ced9e28
159 changed files with 2767 additions and 9484 deletions

View File

@@ -0,0 +1,16 @@
#include "mesh_raytracer_shared.slang"
[shader("raygeneration")]
void _main()
{
uint2 launchIndex = DispatchRaysIndex().xy;
uint8_t edgemask = inputMask.Load(uint3(launchIndex, 0));
uint8_t edgemask1 = inputMask.Load(uint3(launchIndex, 1));
uint8_t edgemask2 = inputMask.Load(uint3(launchIndex, 2));
uint8_t edgemask3 = inputMask.Load(uint3(launchIndex, 3));
uint8_t nBits = (countbits(edgemask) + countbits(edgemask1) + countbits(edgemask2) + countbits(edgemask3));
if ( nBits != 16 && nBits != 0 )
outputTest[launchIndex] = float4(1,0,0,0);
}

View File

@@ -0,0 +1,18 @@
struct RayPayload
{
bool bHit;
float fDistance;
};
#include "shader_base.slang"
DECLARE_CBUFFER(0)
{
float4x4 projection;
}
DECLARE_DATA(1, Texture2DMS<float> inputDepth;);
DECLARE_DATA(2, Texture2DMS<uint8_t> inputMask;);
DECLARE_DATA(3, RWTexture2D<float4> outputTest;);
DECLARE_TEXTURES(29)

View File

@@ -0,0 +1,25 @@
#ifndef SHADER_BASE_SLANG
#define SHADER_BASE_SLANG
/*
* I hope you are not looking at these war crimes.
* They are truly horrible crimes.
* Don't even try to understand what the fuck is happening here.
*/
#define DECLARE_TEXTURES(n) \
[[vk::binding(n)]] \
Sampler2D g_textures[]; \
float4 SampleTexture(uint32_t binding, float2 uv) { return g_textures[binding].Sample(uv); };
#define DECLARE_CBUFFER(b) [[vk::binding(b)]] cbuffer cbuffer_##b
#define DECLARE_DATA(b, r) [[vk::binding(b)]] r
#define DECLARE_CONSTANTS [[vk::push_constant]] cbuffer cbuffer_constants
#define FIX_VERTEX_POSITION(x)
#endif