<@include gpu/Config.slh@> <$VERSION_HEADER$> // Generated on <$_SCRIBE_DATE$> // // standardTransformPNTC.slv // vertex shader // // Created by Sam Gateau on 6/10/2015. // Copyright 2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // <@include gpu/Inputs.slh@> <@include gpu/Color.slh@> <@include gpu/Transform.slh@> <$declareStandardTransform()$> // TODO we need to get the viewport resolution and FOV passed to us so we can modify the point size // and effectively producing a points that take up a constant angular size regardless of the display resolution // or projection matrix out vec4 varColor; out float varSize; void main(void) { varColor = colorToLinearRGBA(inColor); // standard transform TransformCamera cam = getTransformCamera(); TransformObject obj = getTransformObject(); <$transformModelToClipPos(cam, obj, inPosition, gl_Position)$> varSize = inColor.a; gl_PointSize = varSize; }