init
This commit is contained in:
27
funnyassets/gfx_shaders/brush_frag.slang
Normal file
27
funnyassets/gfx_shaders/brush_frag.slang
Normal file
@@ -0,0 +1,27 @@
|
||||
uint32_t hash32(uint32_t x) {
|
||||
x = ((x >> 16) ^ x) * 0x45d9f3b;
|
||||
x = ((x >> 16) ^ x) * 0x45d9f3b;
|
||||
x = (x >> 16) ^ x;
|
||||
return x;
|
||||
}
|
||||
|
||||
[[vk::binding(1)]]
|
||||
uniform Sampler2D textures[];
|
||||
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 position: SV_Position;
|
||||
float2 uv: TEXCOORD0;
|
||||
};
|
||||
|
||||
float4 main(
|
||||
VertexOutput input,
|
||||
uint triid: SV_PrimitiveID,
|
||||
uniform uint textureID,
|
||||
) : SV_TARGET
|
||||
{
|
||||
return float4(textures[textureID].Sample(input.uv).xyz, 1);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user