I've created a shader and I'm trying to test it on Codepen. Despite having no errors in the console, the shader still isn't working as expected. Can anyone help me figure out what's going wrong?
Below is my vertex shader:
<script id="vertexShader" type="shader">
void main() {
vUv = (uModel * vec3(position.xy, 1.)).xy;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
And here is the fragment shader:
<script id="fragmentShader" type="shader">
uniform vec2 uResolution;
uniform sampler2D uTexture1;
varying vec2 vUv;
uniform mat3 uModel;
varying vec2 vUv;
void main() {
// Shader logic goes here...
}
</script>
For the complete code and demo, visit this link.