Slang shaders for buffer device address example
This commit is contained in:
parent
bc3c41e89a
commit
880b48485f
3 changed files with 68 additions and 1 deletions
20
shaders/slang/bufferdeviceaddress/cube.frag.slang
Normal file
20
shaders/slang/bufferdeviceaddress/cube.frag.slang
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* Copyright (c) 2025, Sascha Willems
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
[[vk::binding(0, 0)]]
|
||||
Sampler2D samplerColorMap;
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
[[vk::location(1)]] float3 Color;
|
||||
[[vk::location(2)]] float2 UV;
|
||||
};
|
||||
|
||||
[shader("fragment")]
|
||||
float4 main(VSInput input)
|
||||
{
|
||||
return samplerColorMap.Sample(input.UV) * float4(input.Color, 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue