-
Notifications
You must be signed in to change notification settings - Fork 9
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
30 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,12 @@ | ||
export const customBasicFragmentShader = `#version 300 es | ||
precision highp float; | ||
in vec2 vUV; | ||
uniform sampler2D textureSampler; | ||
out vec4 fragColor; | ||
void main(void) { | ||
fragColor = texture(textureSampler, vUV); | ||
}` |
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,18 @@ | ||
export const customBasicVertexShader = `#version 300 es | ||
precision highp float; | ||
// Attributes | ||
in vec3 position; | ||
in vec2 uv; | ||
// Uniforms | ||
uniform mat4 worldViewProjection; | ||
// Varying | ||
out vec2 vUV; | ||
void main(void) { | ||
gl_Position = worldViewProjection * vec4(position, 1.0); | ||
vUV = uv; | ||
}` |