39 lines
1.3 KiB
GLSL
39 lines
1.3 KiB
GLSL
/* Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 the "License";
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
* ------------------------------------------------------------------------
|
|
*
|
|
* THIS IS A MODIFIED VERSION OF THE ORIGINAL FILE
|
|
*
|
|
* The original file, along with the original Apache-2.0 LICENSE can be found at:
|
|
* https://github.com/google-research/jax3d/tree/main/jax3d/projects/mobilenerf
|
|
*
|
|
* Modification details: Shader code was updated to work on Vulkan (originally
|
|
* built for WebGL)
|
|
* Contributor: (Qualcomm) Rodrigo Holztrattner - quic_rholztra@quicinc.com
|
|
*/
|
|
#version 460
|
|
|
|
out gl_PerVertex {
|
|
vec4 gl_Position;
|
|
};
|
|
|
|
void main()
|
|
{
|
|
vec2 outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
|
gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f);
|
|
}
|