sbylib ~master (2020-02-29T08:12:18Z)
Dub
Repo
GlyphMaterial
sbylib
graphics
material
standard
glyph
Undocumented in source.
class
GlyphMaterial :
Material
{
mixin
RenderPass
!(
StandardRenderPass
)
;
mixin
ShaderSource
!(
ShaderStage
.
Vertex
,
q{
#version
450
layout
(
location
=
0
)
in
vec2
position
;
layout
(
location
=
1
)
in
ivec2
uv
;
layout
(
location
=
0
)
out
vec2
uv2
;
layout
(
binding
=
0
)
uniform
UniformData
{
mat4
worldMatrix
; }
uni
;
void
main
() {
gl_Position
=
uni
.
worldMatrix
*
vec4
(
position
,
0
,
1
);
gl_Position
.
y
= -
gl_Position
.
y
;
uv2
=
uv
; }
}
)
;
mixin
ShaderSource
!(
ShaderStage
.
Fragment
,
q{
#version
450
layout
(
location
=
0
)
in
vec2
uv
;
layout
(
location
=
0
)
out
vec4
fragColor
;
layout
(
binding
=
1
)
uniform
sampler2D
tex
;
void
main
() {
fragColor
=
texture
(
tex
,
uv
/
textureSize
(
tex
,
0
)).
rrrr
; }
}
)
;
struct
Vertex
;
immutable
CreateInfo
i
;
mixin
Info
!
i
;
struct
VertexUniform
;
@
uniform
@
binding
(0)
@
stage
(
ShaderStage
.
Vertex
)
VertexUniform
vertexUniform
;
@
texture
@
binding
(1)
@
stage
(
ShaderStage
.
Fragment
)
Texture
tex
;
mixin
MaxObjects
!(
10
)
;
mixin
Instance
;
}
Members
Mixins
__anonymous
mixin
RenderPass
!(
StandardRenderPass
)
Undocumented in source.
__anonymous
mixin
ShaderSource
!(
ShaderStage
.
Vertex
,
q{
#version
450
layout
(
location
=
0
)
in
vec2
position
;
layout
(
location
=
1
)
in
ivec2
uv
;
layout
(
location
=
0
)
out
vec2
uv2
;
layout
(
binding
=
0
)
uniform
UniformData
{
mat4
worldMatrix
; }
uni
;
void
main
() {
gl_Position
=
uni
.
worldMatrix
*
vec4
(
position
,
0
,
1
);
gl_Position
.
y
= -
gl_Position
.
y
;
uv2
=
uv
; }
}
)
Undocumented in source.
__anonymous
mixin
ShaderSource
!(
ShaderStage
.
Fragment
,
q{
#version
450
layout
(
location
=
0
)
in
vec2
uv
;
layout
(
location
=
0
)
out
vec4
fragColor
;
layout
(
binding
=
1
)
uniform
sampler2D
tex
;
void
main
() {
fragColor
=
texture
(
tex
,
uv
/
textureSize
(
tex
,
0
)).
rrrr
; }
}
)
Undocumented in source.
__anonymous
mixin
Info
!
i
Undocumented in source.
__anonymous
mixin
MaxObjects
!(
10
)
Undocumented in source.
__anonymous
mixin
Instance
Undocumented in source.
Structs
Vertex
struct
Vertex
Undocumented in source.
VertexUniform
struct
VertexUniform
Undocumented in source.
Variables
i
CreateInfo
i
;
Undocumented in source.
tex
Texture
tex
;
Undocumented in source.
vertexUniform
VertexUniform
vertexUniform
;
Undocumented in source.
Inherited Members
From Material
__anonymous
mixin
Descriptor
Undocumented in source.
pipelineLayout
PipelineLayout
pipelineLayout
;
Undocumented in source.
pipeline
Pipeline
pipeline
;
Undocumented in source.
__anonymous
mixin
ImplReleaseOwn
Undocumented in source.
CreateInfo
struct
CreateInfo
Undocumented in source.
Info
mixintemplate
Info
(CreateInfo info_)
Undocumented in source.
RenderPass
mixintemplate
RenderPass
(RenderPassType_)
Undocumented in source.
Instance
mixintemplate
Instance
()
Undocumented in source.
createVertexAttributeDescriptions
VkVertexInputAttributeDescription
[]
createVertexAttributeDescriptions
(uint binding)
Undocumented in source. Be warned that the author may not have intended to support it.
getFormat
template
getFormat
(Type)
Undocumented in source.
vertexInputState
Pipeline
.
VertexInputStateCreateInfo
vertexInputState
()
Undocumented in source. Be warned that the author may not have intended to support it.
Meta
Source
See Implementation
sbylib
graphics
material
standard
glyph
classes
GlyphMaterial