-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Vulkan sample for PushConstants
- Loading branch information
Showing
50 changed files
with
792 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#version 150 | ||
#extension GL_ARB_separate_shader_objects : enable | ||
#extension GL_ARB_shading_language_420pack : enable | ||
|
||
layout(location = 0) in vec4 Color; | ||
|
||
layout(location = 0) out vec4 oColor; | ||
|
||
void main( void ) | ||
{ | ||
oColor = Color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#version 150 | ||
#extension GL_ARB_separate_shader_objects : enable | ||
#extension GL_ARB_shading_language_420pack : enable | ||
|
||
layout(push_constant) uniform ciBlock0T { | ||
mat4 ciModelViewProjection; | ||
vec2 ciRect[2]; | ||
vec2 ciTexCoord[2]; | ||
vec4 ciColor; | ||
} ciBlock0; | ||
|
||
layout(location = 0) in vec4 ciPosition; | ||
|
||
layout(location = 0) out vec4 Color; | ||
|
||
void main( void ) | ||
{ | ||
float x = mix( ciBlock0.ciRect[0].x, ciBlock0.ciRect[1].x, ciPosition.x ); | ||
float y = mix( ciBlock0.ciRect[0].y, ciBlock0.ciRect[1].y, ciPosition.y ); | ||
vec4 pos = vec4( x, y, ciPosition.zw ); | ||
gl_Position = ciBlock0.ciModelViewProjection * pos; | ||
|
||
Color = ciBlock0.ciColor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#version 150 | ||
#extension GL_ARB_separate_shader_objects : enable | ||
#extension GL_ARB_shading_language_420pack : enable | ||
|
||
layout(binding = 0) uniform sampler2D uTex0; | ||
|
||
layout(location = 0) in vec2 TexCoord; | ||
layout(location = 1) in vec4 Color; | ||
|
||
layout(location = 0) out vec4 oColor; | ||
|
||
void main( void ) | ||
{ | ||
oColor = texture( uTex0, TexCoord ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#version 150 | ||
#extension GL_ARB_separate_shader_objects : enable | ||
#extension GL_ARB_shading_language_420pack : enable | ||
|
||
layout(push_constant) uniform ciBlock0T { | ||
mat4 ciModelViewProjection; | ||
vec2 ciRect[2]; | ||
vec2 ciTexCoord[2]; | ||
vec4 ciColor; | ||
} ciBlock0; | ||
|
||
layout(location = 0) in vec4 ciPosition; | ||
|
||
layout(location = 0) out vec2 TexCoord; | ||
layout(location = 1) out vec4 Color; | ||
|
||
void main( void ) | ||
{ | ||
float x = mix( ciBlock0.ciRect[0].x, ciBlock0.ciRect[1].x, ciPosition.x ); | ||
float y = mix( ciBlock0.ciRect[0].y, ciBlock0.ciRect[1].y, ciPosition.y ); | ||
vec4 pos = vec4( x, y, ciPosition.zw ); | ||
gl_Position = ciBlock0.ciModelViewProjection * pos; | ||
|
||
float u = mix( ciBlock0.ciTexCoord[0].x, ciBlock0.ciTexCoord[1].x, ciPosition.x ); | ||
float v = mix( ciBlock0.ciTexCoord[0].y, ciBlock0.ciTexCoord[1].y, ciPosition.y ); | ||
TexCoord = vec2( u, v ); | ||
|
||
Color = ciBlock0.ciColor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
#include "cinder/CinderResources.h" | ||
|
||
//#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) | ||
|
||
|
||
|
Binary file not shown.
Oops, something went wrong.