Skip to content

Instantly share code, notes, and snippets.

View Scylardor's full-sized avatar

Alexandre Baron Scylardor

View GitHub Profile
@Scylardor
Scylardor / vtkTexturingHelper_example.cpp
Last active November 3, 2015 12:57
vtkTexturingHelper example
/*=========================================================================
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
=========================================================================*/
//
// This simple example shows how to use vtkTexturingHelper to texture an
// OBJ 3D model using two texture files in C++.
// The model used by this example (mannequine_clothed) can be found on Artec3D scan gallery
@Scylardor
Scylardor / BlinnPhongNew.vert
Created April 23, 2014 04:13
Phong Shaders
#version 330
uniform mat4 modelViewProjectionMatrix; // automatically imported by OF
uniform mat4 modelViewMatrix; // automatically imported by OF
uniform mat4 normalMatrix; // the normal matrix (the inversed-then-transposed modelView matrix)
uniform vec3 cameraSpaceLightPos; // already in eye space
in vec4 position; // in local space
in vec3 normal; // in local space
out vec4 outputColor;