Example

Description

sealed class Tinman.Demo.Shaders.Example

Derived from

GpuCode abstract

Full source code is included in the Tinman 3D SDK download.

Non-functional syntax examples for GPU code generation.

Public / Methods

CS


[ComputeShader(1, 1, 1)] [If("")]
public static method CS → (2)

in : int3 @ System(Value.DispatchId)

The shader input.

in : int3 @ System(Value.ThreadId)

The shader input.

This is a dummy compute shader with some non-functional example code.

GS


[GeometryShader(GpuCode.POINT, GpuCode.POINT, 1, GpuCode.HINT_SF)] [If("")]
public static method GS → (2)

data in : VS_Example [ ]

Dummy shader input.

stream in : STREAM<VS_Example>

Dummy shader output.

This is a dummy shader.

PS


[If("")] [PixelShader]
public static method PS → (2)

data in : VS_Example

Dummy shader input.

face in : FACE

Dummy shader input.

returns → PS_Out_Target

Dummy shader output.

This is a dummy shader that calls built-in functions of Gpu-X.

PS_​Centroid


[If("")] [PixelShader]
public static method PS_Centroid → (1)

data in : VS_Example @ With(Behaviour.Centroid)

Dummy shader input.

returns → PS_Out_Target

Dummy shader output.

This is a dummy shader with custom behaviour on its parameter.

PS_​Sample


[If("")] [PixelShader]
public static method PS_Sample → (1)

data in : VS_Example @ With(Behaviour.Sample)

Dummy shader input.

returns → PS_Out_Target

Dummy shader output.

This is a dummy shader with custom behaviour on its parameter.

TP


[If("")] [TessellatePatchShader(GpuCode.TRIANGLE, GpuCode.CCW, GpuCode.EQUAL, 3, 3)]
public static method TP → (3)

points in : VS_Example [ ]

Dummy shader input.

data ref : TS_Patch

Dummy shader input / output.

index in : int32

Dummy shader input.

returns → VS_Example

Dummy shader output.

This is a dummy shader.

TV


data in : TS_Patch

Dummy shader input.

points in : VS_Example [ ]

Dummy shader input.

domain in : float3

Dummy shader input.

returns → VS_Example

Dummy shader output.

This is a dummy shader.

VS


[If("")] [VertexShader(GpuCode.HINT_GS | GpuCode.HINT_SF)]
public static method VS → (1)

data in : VS_Example

Dummy shader input.

returns → VS_Example

Dummy shader output.

This is a dummy shader.