sbylib ~master (2020-02-29T08:12:18Z)
Dub
Repo
ColorMaterial
sbylib
graphics
material
standard
color
Undocumented in source.
class
ColorMaterial :
Material
{
mixin
RenderPass
!(
StandardRenderPass
)
;
mixin
ShaderSource
!(
ShaderStage
.
Vertex
,
q{
#version
450
layout
(
location
=
0
)
in
vec3
position
;
layout
(
binding
=
0
)
uniform
UniformData
{
mat4
worldMatrix
;
mat4
viewMatrix
;
mat4
projectionMatrix
; }
uni
;
void
main
() {
gl_Position
=
uni
.
projectionMatrix
*
uni
.
viewMatrix
*
uni
.
worldMatrix
*
vec4
(
position
,
1
);
gl_Position
.
y
= -
gl_Position
.
y
; }
}
)
;
mixin
ShaderSource
!(
ShaderStage
.
Fragment
,
q{
#version
450
layout
(
location
=
0
)
out
vec4
fragColor
;
layout
(
binding
=
1
)
uniform
UniformData
{
vec4
color
; }
uni
;
void
main
() {
fragColor
=
uni
.
color
; }
}
)
;
struct
Vertex
;
immutable
CreateInfo
i
;
mixin
Info
!
i
;
struct
VertexUniform
;
struct
FragmentUniform
;
@
uniform
@
binding
(0)
@
stage
(
ShaderStage
.
Vertex
)
VertexUniform
vertexUniform
;
@
uniform
@
binding
(1)
@
stage
(
ShaderStage
.
Fragment
)
FragmentUniform
fragmentUniform
;
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
vec3
position
;
layout
(
binding
=
0
)
uniform
UniformData
{
mat4
worldMatrix
;
mat4
viewMatrix
;
mat4
projectionMatrix
; }
uni
;
void
main
() {
gl_Position
=
uni
.
projectionMatrix
*
uni
.
viewMatrix
*
uni
.
worldMatrix
*
vec4
(
position
,
1
);
gl_Position
.
y
= -
gl_Position
.
y
; }
}
)
Undocumented in source.
__anonymous
mixin
ShaderSource
!(
ShaderStage
.
Fragment
,
q{
#version
450
layout
(
location
=
0
)
out
vec4
fragColor
;
layout
(
binding
=
1
)
uniform
UniformData
{
vec4
color
; }
uni
;
void
main
() {
fragColor
=
uni
.
color
; }
}
)
Undocumented in source.
__anonymous
mixin
Info
!
i
Undocumented in source.
__anonymous
mixin
MaxObjects
!(
10
)
Undocumented in source.
__anonymous
mixin
Instance
Undocumented in source.
Structs
FragmentUniform
struct
FragmentUniform
Undocumented in source.
Vertex
struct
Vertex
Undocumented in source.
VertexUniform
struct
VertexUniform
Undocumented in source.
Variables
fragmentUniform
FragmentUniform
fragmentUniform
;
Undocumented in source.
i
CreateInfo
i
;
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
color
classes
ColorMaterial