[kit] Use #pragma mark in shader file
Still need to do some reorganization in here
This commit is contained in:
parent
0b752984dc
commit
1bd2ba0a71
1 changed files with 6 additions and 2 deletions
|
@ -50,6 +50,8 @@ typedef struct {
|
||||||
|
|
||||||
typedef float3 Ball;
|
typedef float3 Ball;
|
||||||
|
|
||||||
|
#pragma mark - Vertex
|
||||||
|
|
||||||
vertex RasterizerData
|
vertex RasterizerData
|
||||||
passthroughVertexShader(uint vid [[vertex_id]],
|
passthroughVertexShader(uint vid [[vertex_id]],
|
||||||
constant Vertex* vertexes [[buffer(0)]])
|
constant Vertex* vertexes [[buffer(0)]])
|
||||||
|
@ -63,14 +65,16 @@ passthroughVertexShader(uint vid [[vertex_id]],
|
||||||
|
|
||||||
float sampleAtPoint(float2, constant Ball*, int);
|
float sampleAtPoint(float2, constant Ball*, int);
|
||||||
|
|
||||||
// Color samplers
|
#pragma mark - Color Samplers
|
||||||
float4 singleColor(float, float, float, float4);
|
float4 singleColor(float, float, float, float4);
|
||||||
float4 gradient2(float, float, float, float, float4, float4);
|
float4 gradient2(float, float, float, float, float4, float4);
|
||||||
|
|
||||||
// Helpers
|
#pragma mark - Helpers
|
||||||
float mapValueFromRangeOntoRange(float, float, float, float, float);
|
float mapValueFromRangeOntoRange(float, float, float, float, float);
|
||||||
float4 averageTwoColors(float, float4, float4);
|
float4 averageTwoColors(float, float4, float4);
|
||||||
|
|
||||||
|
#pragma mark - Fragment
|
||||||
|
|
||||||
fragment float4
|
fragment float4
|
||||||
sampleToColorShader(RasterizerData in [[stage_in]],
|
sampleToColorShader(RasterizerData in [[stage_in]],
|
||||||
constant Parameters& parameters [[buffer(0)]],
|
constant Parameters& parameters [[buffer(0)]],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue