More extension bike shedding.
This commit is contained in:
23
test/texture_sample.ink
Normal file
23
test/texture_sample.ink
Normal file
@@ -0,0 +1,23 @@
|
||||
p :: properties {
|
||||
texture : Texture2D;
|
||||
sampler : Sampler;
|
||||
}
|
||||
|
||||
PS_Input :: struct {
|
||||
uv : float2 @uv;
|
||||
pos : float4 @position;
|
||||
}
|
||||
|
||||
vertex main :: (pos : float4 @position, uv : float2 @uv) -> PS_Input {
|
||||
result : PS_Input;
|
||||
|
||||
result.uv = uv;
|
||||
result.pos = pos;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
pixel main :: (input : PS_Input) -> float4 @target {
|
||||
color : float4 = sample(p.texture, input.uv, p.sampler);
|
||||
return color;
|
||||
}
|
||||
Reference in New Issue
Block a user