graphics

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit cff863b0c4f9b2ea651b3daa66c6afa4216fa836
parent 4e62617259fadadf47016aee63da6869f45d4f4a
Author: Brian Swetland <swetland@frotz.net>
Date:   Mon,  9 Sep 2013 00:56:21 -0700

hello: update shader to new naming/location conventions

Diffstat:
Mhello/assets/simple.glsl | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hello/assets/simple.glsl b/hello/assets/simple.glsl @@ -7,17 +7,14 @@ layout(location = A_POSITION) in vec4 aPosition; layout(location = A_NORMAL) in vec3 aNormal; layout(location = A_TEXCOORD) in vec2 aTexCoord; -in vec4 LOCATION; +layout(location = 3) in vec4 aOffset; out vec2 vTexCoord; out vec3 vPosition; out vec3 vNormal; void main() { - vec4 pos = aPosition; - - pos.xyz += LOCATION.xyz * vec3(127.0, 127.0, 127.0); - + vec4 pos = aPosition + aOffset * vec4(127.0, 127.0, 127.0, 0.0); vPosition = (uMV * pos).xyz; vNormal = normalize(uMV * vec4(aNormal, 0.0)).xyz; vTexCoord = aTexCoord;