-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma sokol @vs vs | ||
|
||
in vec3 vertexPosition; | ||
in vec4 vertexColor; | ||
in vec2 vertexTexture; | ||
|
||
uniform vs_params { | ||
mat4 projectionMatrix; | ||
mat4 viewMatrix; | ||
mat4 modelMatrix; | ||
}; | ||
|
||
out vec4 color; | ||
|
||
void main(void) { | ||
gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(vertexPosition, 1.0); | ||
//gl_Position = vec4(0.0, 0.0, 0.0, 1.0); | ||
gl_PointSize = 1.0; | ||
color = vertexColor; | ||
} | ||
|
||
#pragma sokol @end | ||
|
||
#pragma sokol @fs fs | ||
|
||
in vec4 color; | ||
out vec4 fragColor; | ||
void main(void) | ||
{ | ||
fragColor = color; | ||
//fragColor = vec4(1.0, 1.0, 1.0, 1.0); | ||
} | ||
|
||
#pragma sokol @end | ||
|
||
#pragma sokol @program flat vs fs |
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