Files
workinf_Blender_Wasm/blender-5.2.0/extern/opensubdiv-source/examples/farViewer/simpleShader.glsl
2026-08-12 04:47:48 -04:00

45 lines
919 B
GLSL

//
// Copyright 2013 Pixar
//
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://opensubdiv.org/license.
//
layout(std140) uniform Transform {
mat4 ModelViewMatrix;
mat4 ProjectionMatrix;
mat4 ModelViewProjectionMatrix;
};
//--------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------
#ifdef VERTEX_SHADER
layout (location=0) in vec3 position;
layout (location=1) in vec3 color;
out vec4 fragColor;
void main()
{
fragColor = vec4(color,1.0);
gl_Position = ModelViewProjectionMatrix * vec4(position, 1);
}
#endif
//--------------------------------------------------------------
// Fragment Shader
//--------------------------------------------------------------
#ifdef FRAGMENT_SHADER
in vec4 fragColor;
out vec4 color;
void main() {
color = fragColor;
}
#endif