diff --git a/src/lib/babylon/explorer-alpha-shader/basic_fragment.ts b/src/lib/babylon/explorer-alpha-shader/basic_fragment.ts new file mode 100644 index 0000000..58c4eda --- /dev/null +++ b/src/lib/babylon/explorer-alpha-shader/basic_fragment.ts @@ -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); +}` \ No newline at end of file diff --git a/src/lib/babylon/explorer-alpha-shader/basic_vertex.ts b/src/lib/babylon/explorer-alpha-shader/basic_vertex.ts new file mode 100644 index 0000000..5a2b779 --- /dev/null +++ b/src/lib/babylon/explorer-alpha-shader/basic_vertex.ts @@ -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; +}` \ No newline at end of file